I've done something like what you're after in my main project.

What I basically did was toss in my initial "loading" content inside a 
div with a particular ID name. Below that, I create an iframe pointing 
to the first (or only, if need be) CF file that's going to do the 
processing.

In the file/files executed in the iframe, they cook along, calling 
themselves or the next file, and whilst they do their cooking, they call 
the div (by the id) in the parent window, passing updated content in via 
innerHTML.

For example, I have an import process. It's several steps. Once I get to 
the step where I do validation, I generally do this in 1k blocks. Say an 
import is 10k+. You'd get the initial "processing" text - then you'd get 
"processing 1-1000 of 10k+" text, along with a thermometer showing the 
total progress. As the script in the iframe (which is refreshing itself, 
passing what block of 1k it's working on) cooks along, it keeps updating 
the content in that div - 1001-2000, 2001-3000, etc etc. Once it's done, 
I just use some JS to refresh the parent window on to the next script.

For example, on the main script:

<div id="status" style="width:600px;">Processing...</div><p>

<iframe frameborder="0" width="1" height="1" src="(your script/vars 
here)"></iframe>

within the script called in the iframe, when you want to give the user 
an update:

<script language="javascript">
    parent.document.getElementById('status').innerHTML = 'Your 
processing update text...';
</script>

I generally have two iframes set up, to display one or the other based 
on the user status - if it's me, I set the border to one and the 
width/height larger so I can see any errors or textual outputs I may 
have in there as they come up. Otherwise it's invisible to the average user.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262035
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to