By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,805 Members | 1,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,805 IT Pros & Developers. It's quick & easy.

Temporary output (please wait screen)

P: n/a
Hi

I have never done this before... but I could use it now.

How do I create a "please wait" page, which will "reload" once my real
page is ready?
I am talking of a waiting time of some 10-20 secs, but can be
worse.... still even 10 secs I'd like something telling the user, that
data is being processed.

[like when booking an airline ticket... waiting 2 mins there is
common]

Terv
Sonnich
Jan 8 '08 #1
Share this Question
Share on Google+
9 Replies


P: n/a
On Tue, 08 Jan 2008 16:32:55 +0100, jodleren <so*****@hot.eewrote:
I have never done this before... but I could use it now.

How do I create a "please wait" page, which will "reload" once my real
page is ready?
I am talking of a waiting time of some 10-20 secs, but can be
worse.... still even 10 secs I'd like something telling the user, that
data is being processed.

[like when booking an airline ticket... waiting 2 mins there is
common]
Not possible using PHP, look for a javscript solution (which could poll a
php script to see if something is complete).

Keywords to look for: javascript, setTimeOut, XMLHTTPRequest,
window.location
Questions? -comp.lang.javascript
--
Rik Wasmus
Jan 8 '08 #2

P: n/a
jodleren wrote:
Hi

I have never done this before... but I could use it now.

How do I create a "please wait" page, which will "reload" once my real
page is ready?
I am talking of a waiting time of some 10-20 secs, but can be
worse.... still even 10 secs I'd like something telling the user, that
data is being processed.

[like when booking an airline ticket... waiting 2 mins there is
common]

Terv
Sonnich
Output your message, process the info, cache it, html reload, done.
The only problem is that you have to deal carefully with private info,
but it's really affordable.

-thibī
Jan 8 '08 #3

P: n/a
On Jan 8, 4:03 pm, thibī <th...@coralsnake-team.comwrote:
jodleren wrote:
Hi
I have never done this before... but I could use it now.
How do I create a "please wait" page, which will "reload" once my real
page is ready?
I am talking of a waiting time of some 10-20 secs, but can be
worse.... still even 10 secs I'd like something telling the user, that
data is being processed.
[like when booking an airline ticket... waiting 2 mins there is
common]
Terv
Sonnich

Output your message, process the info, cache it, html reload, done.
The only problem is that you have to deal carefully with private info,
but it's really affordable.

-thibī
You don't actually need to reload - as long as the job will complete
before the browser times out, write the 'please' wait inside a div,
flush it, then when the final output is ready make the div invisible
with javascript.

C.
Jan 8 '08 #4

P: n/a
C. (http://symcbean.blogspot.com/) wrote:
On Jan 8, 4:03 pm, thibī <th...@coralsnake-team.comwrote:
>jodleren wrote:
>>Hi
I have never done this before... but I could use it now.
How do I create a "please wait" page, which will "reload" once my real
page is ready?
I am talking of a waiting time of some 10-20 secs, but can be
worse.... still even 10 secs I'd like something telling the user, that
data is being processed.
[like when booking an airline ticket... waiting 2 mins there is
common]
Terv
Sonnich
Output your message, process the info, cache it, html reload, done.
The only problem is that you have to deal carefully with private info,
but it's really affordable.

-thibī

You don't actually need to reload - as long as the job will complete
before the browser times out, write the 'please' wait inside a div,
flush it, then when the final output is ready make the div invisible
with javascript.

C.
There is no guarantee the browser will display anything before all
output is sent.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jan 8 '08 #5

P: n/a
On Jan 8, 6:17 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
C. (http://symcbean.blogspot.com/) wrote:
On Jan 8, 4:03 pm, thibī <th...@coralsnake-team.comwrote:
jodleren wrote:
Hi
I have never done this before... but I could use it now.
How do I create a "please wait" page, which will "reload" once my real
page is ready?
I am talking of a waiting time of some 10-20 secs, but can be
worse.... still even 10 secs I'd like something telling the user, that
data is being processed.
[like when booking an airline ticket... waiting 2 mins there is
common]
Terv
Sonnich
Output your message, process the info, cache it, html reload, done.
The only problem is that you have to deal carefully with private info,
but it's really affordable.
-thibī
You don't actually need to reload - as long as the job will complete
before the browser times out, write the 'please' wait inside a div,
flush it, then when the final output is ready make the div invisible
with javascript.
C.

There is no guarantee the browser will display anything before all
output is sent.
True - but it works on every browser I've tested (MSIE, Firefox,
Konqueror)...and of course its dependant on having a webserver capable
of generating chunked encoding.

Perhaps I should say YMMV.

C.

Jan 9 '08 #6

P: n/a
C. (http://symcbean.blogspot.com/) wrote:
On Jan 8, 6:17 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>C. (http://symcbean.blogspot.com/) wrote:
>>On Jan 8, 4:03 pm, thibī <th...@coralsnake-team.comwrote:
jodleren wrote:
Hi
I have never done this before... but I could use it now.
How do I create a "please wait" page, which will "reload" once my real
page is ready?
I am talking of a waiting time of some 10-20 secs, but can be
worse.... still even 10 secs I'd like something telling the user, that
data is being processed.
[like when booking an airline ticket... waiting 2 mins there is
common]
Terv
Sonnich
Output your message, process the info, cache it, html reload, done.
The only problem is that you have to deal carefully with private info,
but it's really affordable.
-thibī
You don't actually need to reload - as long as the job will complete
before the browser times out, write the 'please' wait inside a div,
flush it, then when the final output is ready make the div invisible
with javascript.
C.
There is no guarantee the browser will display anything before all
output is sent.

True - but it works on every browser I've tested (MSIE, Firefox,
Konqueror)...and of course its dependant on having a webserver capable
of generating chunked encoding.

Perhaps I should say YMMV.

C.

Yep, there are three possible reasons for this not being displayed:

1. PHP buffers may not be full (but can be flushed manually)
2. Web server buffers may not be full (no control but often flushed when
you flush the php buffers)
3. The browser may get the data but not display it.

Like you, I've found generally it works. But not necessarily always.

Now it may be OK with the op if the message only shows 95% of the time
and misses 5% of the customers. I mean - a "please wait" isn't the most
important message in the world :-).

But if he does want it to show up 100% of the time, he should be looking
at the other methods proposed here.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jan 9 '08 #7

P: n/a
On Jan 8, 3:32 pm, jodleren <sonn...@hot.eewrote:
Hi

I have never done this before... but I could use it now.

How do I create a "please wait" page, which will "reload" once my real
page is ready?
I am talking of a waiting time of some 10-20 secs, but can be
worse.... still even 10 secs I'd like something telling the user, that
data is being processed.

[like when booking an airline ticket... waiting 2 mins there is
common]

Terv
Sonnich
This kind of thing is usually done client side with JavaScript. The
jQuery library has a couple of plugins for doing it, the best known
one being BlockUI
Jan 9 '08 #8

P: n/a
Rob
On Jan 9, 1:44*pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
C. (http://symcbean.blogspot.com/) wrote:
On Jan 8, 6:17 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
C. (http://symcbean.blogspot.com/) wrote:
On Jan 8, 4:03 pm, thibī <th...@coralsnake-team.comwrote:
jodleren wrote:
Hi
I have never done this before... but I could use it now.
How do I create a "please wait" page, which will "reload" once my real
page is ready?
I am talking of a waiting time of some 10-20 secs, but can be
worse.... still even 10 secs I'd like something telling the user, that
data is being processed.
[like when booking an airline ticket... waiting 2 mins there is
common]
Terv
Sonnich
Output your message, process the info, cache it, html reload, done.
The only problem is that you have to deal carefully with private info,
but it's really affordable.
-thibī
You don't actually need to reload - as long as the job will complete
before the browser times out, write the 'please' wait inside a div,
flush it, then when the final output is ready make the div invisible
with javascript.
C.
There is no guarantee the browser will display anything before all
output is sent.
True - but it works on every browser I've tested (MSIE, Firefox,
Konqueror)...and of course its dependant on having a webserver capable
of generating chunked encoding.
Perhaps I should say YMMV.
C.

Yep, there are three possible reasons for this not being displayed:

1. PHP buffers may not be full (but can be flushed manually)
2. Web server buffers may not be full (no control but often flushed when
you flush the php buffers)
3. The browser may get the data but not display it.

Like you, I've found generally it works. *But not necessarily always.

Now it may be OK with the op if the message only shows 95% of the time
and misses 5% of the customers. *I mean - a "please wait" isn't the most
important message in the world :-).

But if he does want it to show up 100% of the time, he should be looking
at the other methods proposed here.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================- Hide quoted text -

- Show quoted text -
Have to agree with Jerry here. I've had very mixed results with
browsers displaying the content before the whole page has finished
loading, even after using flush techniques.

One way to help the browser along is to output a stream of data that
causes it to flush it's own buffers, such as a stream of HTML
comments.

Rob.
Jan 9 '08 #9

P: n/a
Rob wrote:
On Jan 9, 1:44 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>C. (http://symcbean.blogspot.com/) wrote:
>>On Jan 8, 6:17 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
C. (http://symcbean.blogspot.com/) wrote:
On Jan 8, 4:03 pm, thibī <th...@coralsnake-team.comwrote:
>jodleren wrote:
>>Hi
>>I have never done this before... but I could use it now.
>>How do I create a "please wait" page, which will "reload" once my real
>>page is ready?
>>I am talking of a waiting time of some 10-20 secs, but can be
>>worse.... still even 10 secs I'd like something telling the user, that
>>data is being processed.
>>[like when booking an airline ticket... waiting 2 mins there is
>>common]
>>Terv
>>Sonnich
>Output your message, process the info, cache it, html reload, done.
>The only problem is that you have to deal carefully with private info,
>but it's really affordable.
>-thibī
You don't actually need to reload - as long as the job will complete
before the browser times out, write the 'please' wait inside a div,
flush it, then when the final output is ready make the div invisible
with javascript.
C.
There is no guarantee the browser will display anything before all
output is sent.
True - but it works on every browser I've tested (MSIE, Firefox,
Konqueror)...and of course its dependant on having a webserver capable
of generating chunked encoding.
Perhaps I should say YMMV.
C.
Yep, there are three possible reasons for this not being displayed:

1. PHP buffers may not be full (but can be flushed manually)
2. Web server buffers may not be full (no control but often flushed when
you flush the php buffers)
3. The browser may get the data but not display it.

Like you, I've found generally it works. But not necessarily always.

Now it may be OK with the op if the message only shows 95% of the time
and misses 5% of the customers. I mean - a "please wait" isn't the most
important message in the world :-).

But if he does want it to show up 100% of the time, he should be looking
at the other methods proposed here.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================- Hide quoted text -

- Show quoted text -

Have to agree with Jerry here. I've had very mixed results with
browsers displaying the content before the whole page has finished
loading, even after using flush techniques.

One way to help the browser along is to output a stream of data that
causes it to flush it's own buffers, such as a stream of HTML
comments.

Rob.
Good point, Rob.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jan 9 '08 #10

This discussion thread is closed

Replies have been disabled for this discussion.