Hello,

MM>I guess in a nutshell I'm wondering if there is a way to send HTML
MM>headers to a browser which tells it to scrap the html it has already
MM>received and display the new HTML I am passing it.
MM>
MM>If this isn't possible, can somebody point me in the direction of a
MM>'please wait' mechanism that is possible - Is there one?

If the long-running process will finish within the usual amount of time
that a browser waits before timing out, this is easy--use an HTTP Refresh
header. For example:

Long running operation is http://www.example.com/getresults.pl
Please wait page is at http://www.example.com/pleasewait.pl

Make an HTML page which does a form submit to pleasewait.pl. pleasewait.pl
just displays an HTML page with an animated "please wait" image on it, and
its headers include the following header:

    Refresh: 1; url=http://www.example.com/getresults.pl?args...

The browser displays the HTML on that page, and then a second later (the 1
in the Refresh header, it could be longer), the browser fetches the second
page. Since the HTML and animated image are already loaded, the user sees
that while waiting for the second page to load.

If the process runs a very long time, you are safer writing getresults.pl
(in this example) to be able to kick off a long-running job in the
background, and just display the status of the job. You can snarf a
Refresh header in that too so that users see it constantly updated.

Humbly,

Andrew

----------------------------------------------------------------------
Andrew Ho               http://www.tellme.com/       [EMAIL PROTECTED]
Engineer                   [EMAIL PROTECTED]          Voice 650-930-9062
Tellme Networks, Inc.       1-800-555-TELL            Fax 650-930-9101
----------------------------------------------------------------------

Reply via email to