> I have an application I am working on...
> I want each portion of the code to send an HTTP request to a page and
> respond back to my page, however I want the calling page to refresh. I
> really want some sort of a status maybe a % complete, but how do I get the
> page to constantly refresh.
> Any ideas and or examples people have seen would be great. Sorry I
> couldn't be anymore vague :) I can see it in my head but not put it in
writing...
No worries on the vagueries, I know what you're getting at... :)
There are a couple of ways this can be done... If you want the page to
actually refresh, you can do something like this in CF 5:
<cfhttp ...>
<cfoutput>
... status info here ...
</cfoutput>
<cfflush>
<script language="javascript">
location.reload();
<!--- or --->
location.replace("urltonextiteminlist");
</script>
Or you can do the whole thing on a single request using something like
this...
<cfoutput>
<table border="0" cellpadding="0" cellspacing="5">
<tr><td ID="statustext"></td></tr>
<tr><td>
<table border="0" cellpadding="0" cellspacing="0"><tr>
<td><img ID="completed" src="spacer.gif"></td>
<td><img ID="remaining" src="spacer.gif"></td>
</tr></table>
</td></tr>
</table>
</cfoutput>
<cfloop ...>
<cfhttp ...>
<script language="javascript">
document.getElementById("completed").width = #completed#;
document.getElementById("remaining").width = #remaining#;
document.getElementById("statustext").innerHTML = "#percentage# complete";
</script>
<cfflush>
</cfloop>
I believe there's also a commercial custom tag in the devex that creates a
progress bar using xml ... I'm not too familiar with the specifics tho...
Isaac Dealey
www.turnkey.to
954-776-0046
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists