Forum Moderators: coopster

Message Too Old, No Replies

"Please Wait While Loading" function

         

Nisse

3:11 pm on Jul 30, 2003 (gmt 0)

10+ Year Member



I have a script that takes about +30sek to load (because of heavy SQL queries.). I would like to show a "Please Wait While Loading" message for the user?

How do I do this in PHP?

dingman

4:56 pm on Jul 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The best I've come up with so far is to ob_flush() before the long stuff starts. You might then spew out some javascript to hide the notice at the end of the page, so that it goes away once your page is fully displayed.

This doesn't work, of course, if the DB work is going to affect HTTP headers, since those can't be changed after any output has been sent to the browser.

Xuefer

6:00 pm on Jul 31, 2003 (gmt 0)

10+ Year Member



output a script, then do a flush(); (should work with output buffering)
u may need flush out some craps to make IE start to parse html