Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 566
  • Last Modified:

Problem with CFFLUSH and MS Internet Explorer

I have an application that displays a progress bar based on the percentage of records that have been processed, and basically builds up a series of 10 cells across the screen to indicate percentage completed.  

The problem I am having is that in Internet Explorer, even when I am using <CFFLUSH>, it display's nothing until the entire page is processed.  When I run the exact same app with Phoenix or Opera, it displays perfect, shows the running percentage bar, and completes.  The code I am using is fairly simple, maybe there is a tweak to enable internet explorer to handle the cfflush better??

Here is a snippet of my ccode I am using...

<cfif Data.CurrentRow gt (#Data.RecordCount#*.01)*10 AND Percent LT 10>
                                   <td bgcolor="##0033FF" width="50" height="7"></td>
                                   <cfset percent = 10>     <cfflush>
                              </cfif>
                              <cfif Data.CurrentRow gt (#Data.RecordCount#*.01)*20 AND Percent LT 20>
                                   <td bgcolor="##0033FF" width="50" height="7"></td>
                                   <cfset percent = 20>     <cfflush>
                              </cfif>


Any help would be greatly appreciated!!!
0
JUSTICE
Asked:
JUSTICE
  • 3
  • 2
1 Solution
 
TallerMikeCommented:
Try looking at these comments I found at the below link:

<!---
     White space pad
     Internet Explorer has a 'feature' where it will not display html until a
     certain amount of data has been reached. In order to get around this and
     ensure the 'please wait' message appears, we output a block of white spaces.
     This will not change the layout, but will help 'motivate' IE to display the
     message. The number below is arbitrary, and can be shortened if additional
     html is added above.
--->
<cfoutput>#repeatString(" ",200)#</cfoutput>

<!--- The first time you use the cfflush tag on a page, it sends back the HTML
headers and any other available HTML. Subsequent cfflush tags on the page send
only the output that was generated since the previous flush.  --->
<cfflush>

<!--- Use cfflush with the interval attribute only when a large amount of output
will be sent to the client, such as in a cfloop or a cfoutput of a large query.  --->
<cfflush interval=10>

http://www.pacificnetconnect.net/cfexamples/magicnumbers/showsource.cfm
0
 
JUSTICEAuthor Commented:
TallerMike -

I added this to my page, right before every <cfflush>, and even changed it from 200 to 400, and IE (I am using version 6.0 SP1 128 bit) still does not display a single thing until the entire page is processed.

You remember looking at the code I posted to my app?  Well, I took your advice to heart about using a cfloop (which helped to speed my app up) but I made several other major changes as well.  Now, as I process a load, I write the processed valued to a SQL ddatabase, then I generate averages, sum's, and I can get statistics from polished data a whole lot easier.  I then wrote a viewer for my end users, which takes URL paramaters and opens the report that they ran.  Then they can view old ones too!  

Anyways, does anyone know of another way to force IE to display the page as it is generated, or is this an inherent 'feature'??
0
 
cdillonCommented:
Tables don't render until the complete table is fed to IE.  This stops the annoying and CPU intensiveness of displaying the table resizing on the fly.  However, if you make your code display seperate table, they will render once a complete table is downloaded.  So, one way to do it to make each row it's own table, but that might not be possible because you want the columns to line up.  You could specify the width of the cell, but sometimes things don't fit and it widens the cells for you.  Break the html tables into as many tables as you can.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
TallerMikeCommented:
Yeah...that's a good point.
0
 
JUSTICEAuthor Commented:
Wooohoooo, that did the trick!!!

Excellent, thank you sir, and I hope this helps someone else out there, I was wracking my brain on this for a while!  :)

Have a great day, and enjoy  your points!!
0
 
JUSTICEAuthor Commented:
Here is the code I used if anyone wants it (pretty simple) and it works great both in IE and in Opera / Mozilla.  :)

<!--- Display percentage bars as the loads are processed --->
                              <cfif Data.CurrentRow gt (#Data.RecordCount#*.01)*10 AND Percent LT 10>
                                   <BR><img src="images/percent.gif">
                                   <cfset percent = 10>     <cfflush>
                              </cfif>
                              <cfif Data.CurrentRow gt (#Data.RecordCount#*.01)*20 AND Percent LT 20>
                                   <img src="images/percent.gif">
                                   <cfset percent = 20>     <cfflush>
                              </cfif>
Etc...
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now