<HTML>
<HEAD><TITLE>&lt;CFFLUSH&gt; Example</TITLE></HEAD>
<BODY>
  
  <!--- Initial Message --->
  <P><STRONG>Please Wait</STRONG><BR>
  We are processing your order.<BR>
  
  <!--- Create the "Meter" image object --->
  <!--- Initially, it displays a blank GIF --->
  <IMG NAME="Meter" SRC="../images/PercentBlank.gif" 
    WIDTH="200" HEIGHT="16" ALT="" BORDER="0">
    
  <!--- Flush the page buffer --->  
  <CFFLUSH>

  <!--- Loop from 0 to 25 to 50 to 75 to 100 --->
  <CFLOOP FROM="0" TO="100" STEP="25" INDEX="i">
    <!--- Time-consuming process goes here ---> 
    <!--- Here, ColdFusion waits for 5 seconds as an example --->
    <!--- Do not use this technique in actual code! --->
    <CFSET InitialTime = Now()>
    <CFLOOP CONDITION="DateDiff('s', InitialTime, Now()) LT 2"></CFLOOP>
    
    <!--- Change the SRC attribute of the Meter image --->
    <CFOUTPUT>
      <SCRIPT LANGUAGE="JavaScript">
        document.images["Meter"].src = '../images/Percent#i#.gif';
      </SCRIPT>
    </CFOUTPUT>
    <CFFLUSH>
  </CFLOOP>

  <!--- Display "Success" message --->
  <P><STRONG>Thank You.</STRONG><BR>
  Your order has been processed.<BR>
</BODY>
</HTML>
