Temporary output (please wait screen)

Temporary output (please wait screen)

am 08.01.2008 16:32:55 von jodleren

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

Re: Temporary output (please wait screen)

am 08.01.2008 16:37:18 von luiheidsgoeroe

On Tue, 08 Jan 2008 16:32:55 +0100, jodleren wrote:
> 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

Re: Temporary output (please wait screen)

am 08.01.2008 17:03:21 von thyb0

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´

Re: Temporary output (please wait screen)

am 08.01.2008 17:12:13 von colin.mckinnon

On Jan 8, 4:03 pm, thib=B4 wrote:
> 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=B4

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.

Re: Temporary output (please wait screen)

am 08.01.2008 19:17:51 von Jerry Stuckle

C. (http://symcbean.blogspot.com/) wrote:
> On Jan 8, 4:03 pm, thib´ wrote:
>> 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.
jstucklex@attglobal.net
==================

Re: Temporary output (please wait screen)

am 09.01.2008 11:17:14 von colin.mckinnon

On Jan 8, 6:17 pm, Jerry Stuckle wrote:
> C. (http://symcbean.blogspot.com/) wrote:
> > On Jan 8, 4:03 pm, thib=B4 wrote:
> >> 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=B4
>
> > 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.

Re: Temporary output (please wait screen)

am 09.01.2008 14:44:12 von Jerry Stuckle

C. (http://symcbean.blogspot.com/) wrote:
> On Jan 8, 6:17 pm, Jerry Stuckle wrote:
>> C. (http://symcbean.blogspot.com/) wrote:
>>> On Jan 8, 4:03 pm, thib´ wrote:
>>>> 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.
jstucklex@attglobal.net
==================

Re: Temporary output (please wait screen)

am 09.01.2008 15:03:44 von gordon

On Jan 8, 3:32 pm, 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

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

Re: Temporary output (please wait screen)

am 09.01.2008 16:12:20 von Rob

On Jan 9, 1:44=A0pm, Jerry Stuckle wrote:
> C. (http://symcbean.blogspot.com/) wrote:
> > On Jan 8, 6:17 pm, Jerry Stuckle wrote:
> >> C. (http://symcbean.blogspot.com/) wrote:
> >>> On Jan 8, 4:03 pm, thib=B4 wrote:
> >>>> 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 re=
al
> >>>>> 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, th=
at
> >>>>> 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=B4
> >>> 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. =A0But 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. =A0I 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.

Re: Temporary output (please wait screen)

am 09.01.2008 17:09:35 von Jerry Stuckle

Rob wrote:
> On Jan 9, 1:44 pm, Jerry Stuckle wrote:
>> C. (http://symcbean.blogspot.com/) wrote:
>>> On Jan 8, 6:17 pm, Jerry Stuckle wrote:
>>>> C. (http://symcbean.blogspot.com/) wrote:
>>>>> On Jan 8, 4:03 pm, thib´ wrote:
>>>>>> 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.
jstucklex@attglobal.net
==================

Re: Temporary output (please wait screen)

am 11.01.2008 13:41:24 von colin.mckinnon

On Jan 9, 4:09 pm, Jerry Stuckle wrote:
> Rob wrote:
> > On Jan 9, 1:44 pm, Jerry Stuckle wrote:
> >> C. (http://symcbean.blogspot.com/) wrote:


Its always good to get some informed opinions when hacking about in
undocumented territory.

C.