Returning Results Incrementally - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

56
3
4
5

Returning results incrementally

You can use the
browser before a ColdFusion page is fully processed. This allows you to give the user
quick feedback when it takes a long time to complete processing a request. For
example, you can use
please wait." when a request takes time to return. You can also use it to
incrementally display a long list as it gets retrieved.
The first time you use the
HTML headers and any other available HTML. Subsequent
send only the output that ColdFusion generated since the previous flush.
You can specify an
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
becomes available. This format is particularly useful when a query responds slowly
with large amounts of data.
<cfif form.lastname is not "">
AND Employee.LastName = '#Form.LastName#'
</cfif>
</cfquery>
<cfif GetEmployees.recordcount is "0">
No records match your search criteria. <br>
Please go back to the form and try again.
<cfelse>
<h4>Employee Data Based on Criteria from Form</h4>
<table>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Salary</th>
</tr>
<cfoutput query="GetEmployees">
<tr>
<td>#FirstName#</td>
<td>#LastName#</td>
<td>#Salary#</td>
</tr>
</cfoutput>
</cfif>
</table>
</body>
</html>
Save the file.
Return to the form, enter search criteria and submit the form.
If no records match the criteria you specified, the message displays.
cfflush
cfflush
interval
cfflush
Chapter 4 Retrieving and Formatting Data
tag to incrementally output long-running requests to the
to display the message, "Processing your request --
tag on a page, it sends to the browser all of the
cfflush
attribute to tell ColdFusion to flush the output each
tag in a
cfloop
cfflush
to incrementally flush data as it
tags on the page

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents