progress bar

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I have a window where it could take a while to display the info. While  
waiting I want to display a "progress bar". Once the info is ready to be  
displayed I want the "progress bar" to disappear.

Can this easiest be done with an animated gif ?  if so, how do I make  
that gif disappear with php ?



Re: progress bar

On Fri, 02 Nov 2007 16:09:50 -0400, Ron Croonenberg wrote:

Quoted text here. Click to load it

You can't.

PHP is a server-side language. By the time the page has been delivered to
the browser the PHP script has finished processing.

You'd have to do this is a client-side language like JavaScript.

I told you this was going to happen.

Re: progress bar

Quoted text here. Click to load it

This isn't possible with PHP alone. The best way to do this now days
is to use javascript. With javascript you can now create a wide range
interactive effects on your website using what is known as "AJAX". Do
a search on google to find some tutorials regarding the subject. I'll
hint you in the obj.hide() direction :)

Re: progress bar

Ron Croonenberg wrote:
Quoted text here. Click to load it

When you press the submit button, the page will wait to get replaced. This  
is your queue to show the progress bar.

If the upload script sends a Location header after it has finished, you can  
let the page reload without the progress bar.


Site Timeline