You can use CFFLUSH, but that just writes the data to the page.  You
can't really "erase" what you wrote to the page without using some form
of _javascript_ and hiding and showing divs.  I've done this before with a
simple:
<div>Please wait because this may take a minute</div>
<cfflush>

Then, at the bottom of your code that does all the outputting, put a
_javascript_ line to hide that div and it will appear that it's not there.

I also tried doing a status bar once, where I had an image and using
_javascript_, I updated the width of the image and the text displayed next
to it, but I updated it every 1 percent and that wrote a separate line
of _javascript_ to the page, so I was unnecessarily writing 100 lines of
_javascript_.  Every 25% might be more feasible and still give you decent
performance.

John

-----Original Message-----
From: Nathan C. Smith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 10:12 AM
To: CF-Talk
Subject: Show status during long request

Hi,

I have a page that takes a long time to process, I would like to update
the user, or at least hide the form that appears on the page, while the
pages are processing.

I think I need to use cfflush, but if anybody has any pointers on how to
accomplish this I would be very appreciative.

I'd the form to be submitted, then a page would come up that says
processing
- don't touch that browser....  and then the results and a new form come
up on the page.  If it could be more descriptive - like say 6 of 42
processed that would be neat too.  (processing occurs inside a loop)

I could really use a clue.

Thanks.

-Nate

Nathan Smith  McKee, Voorhees & Sease, P.L.C.  515.288.3667
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to