progress bar
am 02.11.2007 21:09:50 von Ron Croonenberg
Hello,
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 ?
thanks,
Ron
Re: progress bar
am 02.11.2007 22:39:50 von Ivan Marsh
On Fri, 02 Nov 2007 16:09:50 -0400, Ron Croonenberg wrote:
> Hello,
>
> 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 ?
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
am 03.11.2007 08:21:15 von Chris Gorospe
On Nov 2, 1:09 pm, Ron Croonenberg wrote:
> Hello,
>
> 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 ?
>
> thanks,
>
> Ron
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
am 03.11.2007 11:53:52 von Janwillem Borleffs
Ron Croonenberg wrote:
> 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 ?
>
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.
JW