This is off the top of my head (so keep in mind that I could be guessing on
some items)....
Main Page:
<script language="javascript">
setInterval(GetProgress, 1000) //run the GetProgress
function every second
function GetProgres() {
document.all.MyIFrameName.src = "myactionpage.cfm";
}
</script>
<iframe id="MyIFrameName" name="MyIFrameName" height="0" width="0"></iframe>
<img src="1x1pixel.gif" width="1" height="10" id="MyProgressBar">
ACTION PAGE:
..
Server side processing
..
<script language="javascript">
var MyBar = parent.document.all.MyProgressBar;
MyBar.width = MyBar.width + 1;
</script>
Now, that said, you should check out Raymond Camden's article on using
CFFLUSH to create a progress bar. You can find it on the Macromedia site
somewhere (I know, not particularly helpful, but the best I can do right
this moment).
I've used the above routines for some VERY complex processing, and updated
the parent page, without ever having to do a page refresh. It's a fair bit
more work, but the end results are very slick. And don't forget that you can
use server side processing (a'la Cold Fusion) to build the necessary
javascript, or parts of the javascript - i.e.
<cfoutput>alert("#MyMessage#");</cfoutput>.
HTH
Shawn Grover
-----Original Message-----
From: Neil H. [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 10:10 AM
To: CF-Talk
Subject: Re: Elaborate plan...
Thanks.. You don't happen to know an example of this anywhere do you?
Neil
----- Original Message -----
From: "Shawn Grover" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, July 22, 2002 11:58 AM
Subject: RE: Elaborate plan...
> You're going to hear references to Metatag refresh, and HTTP Header
refresh
> options.
>
> Judging from your statements, I think these would not be the best
solution.
>
> If you are dealing with IE only, you can use IFRAMES (in Netscape, I think
> the equivalent is a Layer). In Javascript on the main form, you can set a
> timer that calls a function (setTimeout()) - if your function sets the
> location of the IFRAME, the page loaded there can do whatever processing
you
> need, then update the parent page through javascript - including changing
> the page itself.
>
> I've found this to be a much cleaner solution than refreshing whole
pages -
> the user doesn't see the page getting reloaded, but DOES see the results
of
> the reload, which would be the data being updated.
>
> My thoughts.... Not yours...
>
> Shawn Grover
>
> -----Original Message-----
> From: Neil H. [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 22, 2002 9:38 AM
> To: CF-Talk
> Subject: Elaborate plan...
>
>
> 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...
>
> Thanks,
>
> Neil
>
>
>
>
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.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