Re: Progress bar?
| From: | Andy Woolley | Date: | Fri, 08 Dec 2000 13:03:57 +0000 |
| Subject: | Re: Progress bar? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-29336@lists.php.net to get a copy of this message | ||
Guys,
I think that this is being a little too complicated.
In the past I used Layers, though not supported in NS6 and most importantly
the DOM, to display a portion of the page with an animated "scrolling bar"
gif.
ie. You need to split your page into two sections using <DIV>'s the first
DIV displays as the second DIV loads. When the loading DIV has finished
loading, you hide the first DIV and display the second DIV containing your
search results.
The combination of PHP, Javascript and DHTML make it work.
Check out www.businessmeetings.com click on find a venue and search for
"North America" to see this approach in action. Although this code uses
layers that break quite dramaticaly under Netscape 6 it works well under IE
and NS4.x
Regards.
Andy Woolley
www.databasewatch.com
----- Original Message -----
From: "Jason Lavigne" <jlavigne@stonecroft.net>
To: "Miles Thompson" <milesthompson@sprint.ca>; <murph@murphatnight.com>
Cc: <php-general@lists.php.net>
Sent: Saturday, December 09, 2000 12:39 AM
Subject: Re: [PHP] Progress bar?
> If you were to use a streaming HTML window from PHP ( as seen in PHPChat
on
> http://www.phpwizard.com ) you can keep sending data to the
> browser
without
> reposting ( read about flush() ) to the server. So if you did this you
could
> do the following in PHP:
>
> Do select from SQL and return Num of rows (use a function that counts the
> total number of records from the select) and send that to the browser.
> As you process each record you could send back to the browser that you
> processed X records. (I would send this update after 10 records or add
code
> that after each % that was done I send back that number)
> At this time the browser has the total number of records and is receiving
> the record number that was processed (10 out of 100 etc...)
> Then using JavaScript you could feed those values in to DHTML or Flash to
> graphically do a status bar.
>
> Is there another solution? I am sure there is, but it is not impossible.
>
> Let me know if you do do this, I would be interested is seeing in working
:)
>
> Jay
>
> ----- Original Message -----
> From: "Miles Thompson" <milesthompson@sprint.ca>
> To: "Murph" <murph@murphatnight.com>; "PHP General List"
> <php-general@lists.php.net>
> Sent: Friday, December 08, 2000 7:25 AM
> Subject: Re: [PHP] Progress bar?
>
>
> > If you did one you'd have to fake it. Think about it, the web is
stateless
> environment, no channel is opened and maintained to the back end, and SQL
> queries are essentially the same. If a progress bar
> > displays while a SQL query executes, it's provided by the database
vendor.
> >
> > If you did have feedback from the SQL engine you would need to keep
firing
> new pages to the browser.
> >
> > Regards - Miles Thompson
> >
> > Murph wrote:
> >
> > > Hi!
> > >
> > > Has anyone invented a progress bar that displays on a web page to
> entertain the viewer while they wait for a query to finish? I'd be
> interested in getting a pointer to a snippet of code if you have it.
> > >
> > > Yours,
> > > Murph
> > >
> > > www.murphatnight.com
> > > __________________________________________________________________
> > > Brian Murphy - 193A Lowell St., Apt. 24 - Methuen, MA 01844 - (978)
> 725-6654
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>