Re: [PHP] How to display a 'please wait' message whilst processing?
I would suggest using the PEAR Package html_progress available at your friendly neighborhood pear repository mirror. You can extend the class to work as needed and it uses the observer pattern to do it's magic. There are other ways to do this but html_progress is the simplest way to get you up and going. Brent Clements Innovative PHP Development Company ::a division of Im-Online, LLC - Original Message - From: "Brent Baisley" <[EMAIL PROTECTED]> To: "Graham Cossey" <[EMAIL PROTECTED]> Cc: "Php-General" <[EMAIL PROTECTED]> Sent: Friday, November 05, 2004 2:03 PM Subject: Re: [PHP] How to display a 'please wait' message whilst processing? > I've read of solutions on how to do this, but can't remember where. You > will probably need to search the message archives. You can pretty much > forget about the flush() command though, browsers don't handle it the > same way. For instance, Internet Explorer won't display anything until > it has either the whole page or a certain amount of data (something > like 24K). Also, I don't think any browser will display anything unless > all the html tags are closed (i.e. ...). > > I think one solution was to use CSS and DHTML to display the wait > message as a separate page in a on the current page. Once the > processing is done, the page will finished loading and the wait message > will be hidden. Unfortunately, I don't think you can use this technique > without javascript. But, I think it will work if javascript is not > enabled, the user just won't see the wait message. > > > On Nov 5, 2004, at 11:50 AM, Graham Cossey wrote: > > > > > [snip] > >> On a number of sites a message and/or graphic is displayed asking you > >> to > >> wait or be patient whilst some processing is being performed to > >> compose the > >> next page. > >> > >> How are these done within PHP scripts? > >> Could output buffering be used for this purpose? > >> For example is it possible to do something like: > >> > > [snip] > > > > Does anyone have any ideas on this? > > > > I do not really want to use META refresh as my understanding is that > > this > > either reloads the same page (loop?) or a new page, which I don't see > > working as I want the "Please wait.." to remain until the processing > > has > > finished, not for a fixed period of time as the report may take 10 > > seconds > > or one minute to complete running. > > > > I want to avoid Javascript if at all possible, as I cannot guarantee it > > being available on the client. > > > > I have managed to use flush() to display some text, but after > > processing (or > > sleep) I cannot 'overwrite' this only add to it. > > > > Any help much appreciated... > > > > Graham > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > Brent Baisley > Systems Architect > Landover Associates, Inc. > Search & Advisory Services for Advanced Technology Environments > p: 212.759.6400/800.759.0577 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to display a 'please wait' message whilst processing?
I've read of solutions on how to do this, but can't remember where. You will probably need to search the message archives. You can pretty much forget about the flush() command though, browsers don't handle it the same way. For instance, Internet Explorer won't display anything until it has either the whole page or a certain amount of data (something like 24K). Also, I don't think any browser will display anything unless all the html tags are closed (i.e. ...). I think one solution was to use CSS and DHTML to display the wait message as a separate page in a on the current page. Once the processing is done, the page will finished loading and the wait message will be hidden. Unfortunately, I don't think you can use this technique without javascript. But, I think it will work if javascript is not enabled, the user just won't see the wait message. On Nov 5, 2004, at 11:50 AM, Graham Cossey wrote: [snip] On a number of sites a message and/or graphic is displayed asking you to wait or be patient whilst some processing is being performed to compose the next page. How are these done within PHP scripts? Could output buffering be used for this purpose? For example is it possible to do something like: [snip] Does anyone have any ideas on this? I do not really want to use META refresh as my understanding is that this either reloads the same page (loop?) or a new page, which I don't see working as I want the "Please wait.." to remain until the processing has finished, not for a fixed period of time as the report may take 10 seconds or one minute to complete running. I want to avoid Javascript if at all possible, as I cannot guarantee it being available on the client. I have managed to use flush() to display some text, but after processing (or sleep) I cannot 'overwrite' this only add to it. Any help much appreciated... Graham -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to display a 'please wait' message whilst processing?
[snip] > On a number of sites a message and/or graphic is displayed asking you to > wait or be patient whilst some processing is being performed to > compose the > next page. > > How are these done within PHP scripts? > Could output buffering be used for this purpose? > For example is it possible to do something like: > [snip] Does anyone have any ideas on this? I do not really want to use META refresh as my understanding is that this either reloads the same page (loop?) or a new page, which I don't see working as I want the "Please wait.." to remain until the processing has finished, not for a fixed period of time as the report may take 10 seconds or one minute to complete running. I want to avoid Javascript if at all possible, as I cannot guarantee it being available on the client. I have managed to use flush() to display some text, but after processing (or sleep) I cannot 'overwrite' this only add to it. Any help much appreciated... Graham -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to display a 'please wait' message whilst processing?
Graham Cossey wrote: On a number of sites a message and/or graphic is displayed asking you to wait or be patient whilst some processing is being performed to compose the next page. Usually you need to do this when the data is collected from a POST and/or you don't want the user to reload the page. The best solution (IMHO) is to use meta refresh. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to display a 'please wait' message whilst processing?
On a number of sites a message and/or graphic is displayed asking you to wait or be patient whilst some processing is being performed to compose the next page. How are these done within PHP scripts? Could output buffering be used for this purpose? For example is it possible to do something like: Should I be aware of anything that could trip me up on this? Any help or pointers much appreciated. Graham -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php