Whilst loading

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Brakanjan
Forum Newbie
Posts: 19
Joined: Wed May 14, 2003 9:57 am
Location: South Africa

Whilst loading

Post by Brakanjan »

Hi

I generate a php script that involves connecting to database and doing numerous queries. I would like to show something to the user while the page is loading, but am not sure how to do this. Isn't there something similar to lowscr?

tx
[]InTeR[]
Forum Regular
Posts: 416
Joined: Thu Apr 24, 2003 6:51 am
Location: The Netherlands

Post by []InTeR[] »

I'm doing this with javascript and layers in html.

In the 'update' while loop, i echo a part of a script that changes a div.innerHTML. After this is flush();.

If the 'loading' is ready i reload the page.
Brakanjan
Forum Newbie
Posts: 19
Joined: Wed May 14, 2003 9:57 am
Location: South Africa

Post by Brakanjan »

Hi

tx for the tip, but where should the flush() command be? How do you know your page has finished loading?
[]InTeR[]
Forum Regular
Posts: 416
Joined: Thu Apr 24, 2003 6:51 am
Location: The Netherlands

Post by []InTeR[] »

If all the php script is done, the page is ready.
So at the end. (server side only).
And the flush is after the 'javascript-update' echo...
Brakanjan
Forum Newbie
Posts: 19
Joined: Wed May 14, 2003 9:57 am
Location: South Africa

Post by Brakanjan »

sure.

I see here "flushing will not work in a PHP/Apache configuration running on a Windows system." so that's why I couldn't see anything working

tx anyway
Post Reply