Re: Please wait Handler

2003-02-17 Thread Martin Moss
Thanks for all your help guys,

Will have a think about it,

Marty
- Original Message -
From: Randal L. Schwartz [EMAIL PROTECTED]
To: Perrin Harkins [EMAIL PROTECTED]
Cc: Andrew Ho [EMAIL PROTECTED]; Martin Moss
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, February 16, 2003 7:43 AM
Subject: Re: Please wait Handler


  Perrin == Perrin Harkins [EMAIL PROTECTED] writes:

 Perrin Andrew Ho wrote:
  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...

 Perrin That's what Randal does in the article that I posted (although his
 Perrin puts it in a META tag).  It's called client pull, and was
introduced
 Perrin by Netscape at the same time as server push.

 There's a later better example of that (self-cleaning, etc)
 at http://www.stonehenge.com/merlyn/LinuxMag/col39.html.

 I usually don't recycle ideas unless I can put a new slant on it.
 Check out the new slant. :)

 --
 Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777
0095
 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
 See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl
training!





Re: Please wait Handler

2003-02-15 Thread Randal L. Schwartz
 Perrin == Perrin Harkins [EMAIL PROTECTED] writes:

Perrin Andrew Ho wrote:
 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...

Perrin That's what Randal does in the article that I posted (although his
Perrin puts it in a META tag).  It's called client pull, and was introduced
Perrin by Netscape at the same time as server push.

There's a later better example of that (self-cleaning, etc)
at http://www.stonehenge.com/merlyn/LinuxMag/col39.html.

I usually don't recycle ideas unless I can put a new slant on it.
Check out the new slant. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Please wait Handler

2003-02-14 Thread Martin Moss



All,

I was wondering if it is possible to Create a 
Handler that points a user at a page with an animated gif saying something like 
"Please wait", and then when my other handlers have finisheddisplay the 
page results I want from my mod perl handlers.

I guess in a nutshell I'm wondering if there is a 
way to send HTML headers to a browser which tells it to scrap the html it has 
already received and display the new HTML I am passing it.

If this isn't possible, can somebody point me in 
the direction of a 'please wait' mechanism that is possible - Is there 
one?

Kind regards

Marty


Re: Please wait Handler

2003-02-14 Thread Lee Goddard
-BEGIN PGP SIGNED MESSAGE-
Hash: MD5

Hi Martin,

On Friday, February 14, 2003 at 2:24:49 PM, you wrote:
MM I was wondering if it is possible to Create a Handler that points a user at a page 
with an animated gif saying something like Please wait, and then when my other 
handlers have finished display
MM the page results I want from my mod perl handlers.
MM I guess in a nutshell I'm wondering if there is a way to send HTML headers to a 
browser which tells it to scrap the html it has already received and display the new 
HTML I am passing it.
MM If this isn't possible, can somebody point me in the direction of a 'please wait' 
mechanism that is possible - Is there one?

I don't know about the handlers, but I've never read of an
HTTP header to do as you ask.

What I do, good or not I don't know, is send the Please Wait message
as a load of HTML 'div' elements with their 'display' CSS attribute
set to 'hidden'. As my program works, it sends at regular intervals
little bits of JavaScript to tell the client to display another DIV.
This has the effect of a progress bar incrementing. When I do not
know how much I have to do, I have the progress bar reverse itself
once full.

When the program is ready to move on, it sends some JS to redirect
the client to the next URI.

I've found that animated GIFs don't work in this situation since
the IE client I work with needs to get the whole document before it
will look for elements linked to from that document - including
images and stylesheets.

Hope this helps.
- --
Cheers
 Leemailto:[EMAIL PROTECTED]

$$=qw$808273788400074285838400657879847269820080698276007265677569820727$;
$$=~s$(\d\d)$\$_.=chr(\$1+32)$ge;eval;

-BEGIN PGP SIGNATURE-
Version: 2.6

iQCVAwUAPkzzA6drfekeF/QBAQFgQwP/Sm/840HI2pD+I4jhRqoqino2P1+Cza56
OI9aA8UYutvreXkWaoaSrmGEiPMDuaLhcOHi1fAgDCZ8k33VPrhVlgZyHz97LqAG
pwrS0/cOPW+55SFQjw9RmmyIc9i6b4TPGOPury0RbaHbO+RIH23Dsag4Si5uEHuX
SncVZ6Adz50=
=I26o
-END PGP SIGNATURE-




Re: Please wait Handler

2003-02-14 Thread Perrin Harkins
Martin Moss wrote:

I was wondering if it is possible to Create a Handler that points a user 
at a page with an animated gif saying something like Please wait, and 
then when my other handlers have finished display the page results I 
want from my mod perl handlers.

The classic answer to this problem is described by Randal in one of his 
Web Techniques columns:
http://www.stonehenge.com/merlyn/WebTechniques/col20.html

You can also try server push (with the Content-type: 
multipart/x-mixed-replace header), but I'm not sure how consistently 
today's browsers implement that.

- Perrin



Re: Please wait Handler

2003-02-14 Thread Dmitri Tikhonov
On Fri, Feb 14, 2003 at 11:08:48AM -0500, Perrin Harkins wrote:
 Martin Moss wrote:
 I was wondering if it is possible to Create a Handler that points a user 
 at a page with an animated gif saying something like Please wait, and 
 then when my other handlers have finished display the page results I 
 want from my mod perl handlers.
 
 The classic answer to this problem is described by Randal in one of his 
 Web Techniques columns:
 http://www.stonehenge.com/merlyn/WebTechniques/col20.html
 
 You can also try server push (with the Content-type: 
 multipart/x-mixed-replace header), but I'm not sure how consistently 
 today's browsers implement that.

I know bugzilla does just that (Please wait message when a query is
performed), and it works on my Netscape 4.7, Mozilla, and IE browsers.
I think it is a much better solution than that given by Randal.

  - Dmitri.




Re[2]: Please wait Handler

2003-02-14 Thread Lee Goddard
-BEGIN PGP SIGNED MESSAGE-
Hash: MD5

Hi Dmitri,

On Friday, February 14, 2003 at 6:11:01 PM, you wrote:

 You can also try server push (with the Content-type:
 multipart/x-mixed-replace header), but I'm not sure how consistently
 today's browsers implement that.

DT I know bugzilla does just that (Please wait message when a query is
DT performed), and it works on my Netscape 4.7, Mozilla, and IE browsers.
DT I think it is a much better solution than that given by Randal.

Have you got a URI to that, please? Last time I push with IE
I gave up unsatisfied, but now I feel optimistic :)


- --
Cheers
 Leemailto:[EMAIL PROTECTED]

$$=qw$808273788400074285838400657879847269820080698276007265677569820727$;
$$=~s$(\d\d)$\$_.=chr(\$1+32)$ge;eval;

-BEGIN PGP SIGNATURE-
Version: 2.6

iQCVAwUAPk1FoKdrfekeF/QBAQHifQP+OfKIuPHGuBlN/Sh/mo6NYEb1mkUliEAk
mi7Opyvhy2dhP5ytZG6bftJxGkjSQinIW+gErA8I5KYRqxLN0gYSOoWngjRc/wwK
o6iVi/AQQn/+itDsJeAXScGpyFBq3uhipr7q7hFUZr5kUNdXP+k74KJlk9GNL4Rn
tPqzWvvKliY=
=ldST
-END PGP SIGNATURE-




Re: Please wait Handler

2003-02-14 Thread Dmitri Tikhonov
On Fri, Feb 14, 2003 at 08:38:08PM +0100, Lee Goddard wrote:
 Have you got a URI to that, please? Last time I push with IE
 I gave up unsatisfied, but now I feel optimistic :)

I don't have _the_ way for you to do it, but one live example is Apache's
bug database: http://nagoya.apache.org/bugzilla/index.html.  Run some
queries and capture packets and see how it works.

  - Dmitri.




Re: Please wait Handler

2003-02-14 Thread Andrew Ho
Hello,

MMI guess in a nutshell I'm wondering if there is a way to send HTML
MMheaders to a browser which tells it to scrap the html it has already
MMreceived and display the new HTML I am passing it.
MM
MMIf 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-TELLFax 650-930-9101
--




Re: Please wait Handler

2003-02-14 Thread Perrin Harkins
Andrew Ho wrote:

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...


That's what Randal does in the article that I posted (although his puts 
it in a META tag).  It's called client pull, and was introduced by 
Netscape at the same time as server push.

- Perrin



Re: Please wait Handler

2003-02-14 Thread David Dick
Last time I experimented with Server-Push, the only browser that 
implemented it was Netscape 4.*.  Mozilla didn't and IE didn't.  Which 
is a pity cos it's a really useful technique.

Perrin Harkins wrote:

Martin Moss wrote:


I was wondering if it is possible to Create a Handler that points a 
user at a page with an animated gif saying something like Please 
wait, and then when my other handlers have finished display the page 
results I want from my mod perl handlers.


The classic answer to this problem is described by Randal in one of 
his Web Techniques columns:
http://www.stonehenge.com/merlyn/WebTechniques/col20.html

You can also try server push (with the Content-type: 
multipart/x-mixed-replace header), but I'm not sure how consistently 
today's browsers implement that.

- Perrin