?
Solved

Problem with CFFLUSH and MS Internet Explorer

Posted on 2003-03-04
6
Medium Priority
?
559 Views
Last Modified: 2013-12-24
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
Comment
Question by:JUSTICE
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 8

Expert Comment

by:TallerMike
ID: 8065481
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
 
LVL 1

Author Comment

by:JUSTICE
ID: 8065574
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
 
LVL 3

Accepted Solution

by:
cdillon earned 260 total points
ID: 8072252
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
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 
LVL 8

Expert Comment

by:TallerMike
ID: 8072276
Yeah...that's a good point.
0
 
LVL 1

Author Comment

by:JUSTICE
ID: 8072365
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
 
LVL 1

Author Comment

by:JUSTICE
ID: 8072426
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

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
What You Need to Know when Searching for a Webhost Provider
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month9 days, 21 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question