Ammon,

Not as pretty as you might want but you can use the html meta tag to refresh
the page

. browser sends request to CGI script   ... say script is
%long-running-thing.r
. %long-running-thing.r sends page to browser with message about process in
progress
. this page includes <META HTTP-EQUIV="Refresh"
CONTENT="10;URL=http://your.domain/monitor.r";>
. %long-running-thing.r script sets semaphore to indicate process not done
. %long-running-thing.r starts its work
. after 10 seconds, the browser refresh sends a request to your %monitor.r
to see if anything has finished
. %monitor.r checks the semaphore
. if done, then %monitor. r sends the final results to the browser
. if not done, then %monitor.r returns the same (or another) in progress
message to the browser
. this refreshed page has to have a meta tag in it to refresh as the
original message did

. long-running-thing.r runs in background
. when finished, it stores the results where they can be picked up by
monitor.r and sent to the browser
. when finished, it resets the semaphore to indicate that the process is
done

. for the semaphores, it can be whatever you need but writing a file named
with the unique key to distinguish separate users seems to work
. you can pass the key back on the url for the refresh e.g.

<META HTTP-EQUIV="Refresh"
CONTENT="10;URL=http://your.domain/monitor.r?key=123456789";>

And, of course, the semaphore file can be the result file if
%long-running.thing.r is written that way.

----- Original Message -----
From: "Ammon Johnson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 24, 2002 6:21 AM
Subject: [REBOL] New Document (CGI)


> Hi,
>
> I am playing with some CGI....  I have a time consuming script that
happens
> in the background & I want to let the user know something is happening,
but
> when it is done I want to send the user a fresh page & get rid of the
> notification stuff.  Has anyone here done anything similar?



-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to