User Guide

Table Of Contents
Returning results to the user 623
</cfoutput>
</cfif>
</table>
</body>
</html>
3.
Save the file.
4.
Return to the form, enter search criteria, and submit the form.
5.
If no records match the criteria you specified, the message appears.
Returning results incrementally
You can use the
cfflush tag to incrementally display long-running requests to the browser before
a ColdFusion page is fully processed. This tag lets you give the user quick feedback when it takes
a long time to complete processing a request. For example, when a request takes time to return
results, you can use the
cfflush tag to display the message, “Processing your request -- please
wait.” You can also use it to incrementally display a long list as it gets retrieved.
The first time you use the
cfflush tag on a page, it sends to the browser all of the HTML
headers and any other available HTML. Subsequent
cfflush tags on the page send only the
output that ColdFusion generated after the previous flush.
You can specify an
interval attribute to tell ColdFusion to flush the output each time that at
least the specified number of bytes become available. (The count does not include HTML
headers and any data that is already available when you make this call.) You can use the
cfflush
tag in a
cfloop tag to incrementally flush data as it becomes available. This format is particularly
useful when a query responds slowly with large amounts of data.
When you flush data, make sure that a sufficient amount of information is available, because
some browsers might not respond if you flush only a very small amount. Similarly, if you use an
interval attribute, set it for a reasonable size, such as a few hundred bytes or more, but not
many thousands of bytes.
Limitations of the cfflush tag Because the cfflush tag sends data to the browser when it
executes, it has several limitations, including the following:
Using any of the following tags or functions on a page anywhere after the cfflush tag can
cause errors or unexpected results:
cfcontent, cfcookie, cfform, cfheader, cfhtmlhead,
cflocation, and SetLocale. (These tags and functions normally modify the HTML header,
but cannot do so after a
cfflush tag, because the cfflush tag sends the header.)
Using the cfset tag to set a cookie anywhere on a page that has a cfflush tag does not set the
cookie in the browser.
Using the cfflush tag within the body of several tags, including cfsavecontent, cfquery,
and custom tags, can cause errors.
If you save Client variables as cookies, any client variables that you set after a cfflush tag are
not saved in the browser.
You can catch cfflush errors, except Cookie errors, with a cfcatch type="template" tag.
Catch cookie errors with a
cfcatch type="Any" tag.