MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual page 77

Table of Contents

Advertisement

Returning Results to the User
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
hundred bytes or more but not many thousands of bytes.
Caution
After you use the
modifies the HTML header causes an error. These include the
cfcookie, cfform, cfheader, cfhtmlhead,
error if you use the
errors can be caught with a
caught with
The following example uses the
generating function to artificially delay the generation of data for display. It
simulates a situation in which it takes time to retrieve the first data and additional
information becomes available slowly.
<html>
<head>
</head>
<body>
<H1>Your Magic numbers</H1>
<P>It will take us a little while to calculate your ten magic numbers.
It takes a lot of work to find numbers that truly fit your personality.
So relax for a minute or so while we do the hard work for you.</P>
<H2>We are sure you will agree it was worth the short wait!</H2>
<cfflush>
<cfflush interval=10>
<!--- Delay Loop to make is seem harder --->
<cfloop index="randomindex" from="1" to="200000" step="1">
</cfloop>
<!--- Now slowly output 10 random numbers --->
<cfloop index="Myindex" from="1" to="10" step="1">
</cfloop>
</body>
</html>
interval
cfflush
cfset
cfcatch type="Any"
<title>Your Magic numbers</title>
<cfset random=rand()>
<cfloop index="randomindex" from="1" to="100000" step="1">
<cfset random=rand()>
</cfloop>
<cfoutput>
Magic number number #Myindex# is:&nbsp;&nbsp;#RandRange( 100000,
999999)#<br><br>
</cfoutput>
attribute, set it for a reasonable size, such as a few
tag on a page, any CFML function or tag on the page that
and
tag to set a Cookie scope variable. All errors except Cookie
cfcatch type="template"
.
tag and the
cfloop
cfcontent,
tags. You also get an
cflocation
tag. Cookie errors can be
random number
rand()
57

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 5-DEVELOPING and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion 5

Table of Contents