RE: [PHP] Progress bar?
| From: | Maxim Maletsky | Date: | Fri, 08 Dec 2000 13:51:58 +0000 |
| Subject: | RE: [PHP] Progress bar? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-29344@lists.php.net to get a copy of this message | ||
I have no idea on how to do that, in fact I am asking to forward me the
answer if it will ever be discovered.
However two thoughts came now to my mind:
1. what if we magically would be able to interfere the connection with mySQL
and : first php counts how many rows are there second gives the number some
java applet (can it even be a flash?) on the page which then increases.
2. (guys, this is just too stupid... but can work better then anything else
if REALLY NEEDED), you pull the data out without showing it yet, then count
the array, generate a loop with a print(), flush() and an usleep() in it. It
will be showing to you the progress when the data has finished to load
already. stupid isn't it? I've done it once for a delete function on one of
my intranet projects, just to show that delete a record is sort of 'hard'.
(I wanted people to delete the staff a little less) LOL...
Guess what? It worked! :-)))))
Well, anyway... I don't think a plan HTML can do something similar in a
cost-effective developing progress. I guess a Java Applet is needed or
something like that.
in programming 'everything' is possible, but this is only working for your
studies, in a real web development you won't spend all that time gaining the
pain in your a..s just to make your DB a little cooler.
Cheers!
Maxim Maletsky
-----Original Message-----
From: Jason Lavigne [mailto:jlavigne@stonecroft.net]
Sent: Saturday, December 09, 2000 10:13 AM
To: Andy Woolley; Miles Thompson; murph@murphatnight.com
Cc: php-general@lists.php.net
Subject: Re: [PHP] Progress bar?
Your progress bar is an animated gif and that was not what I was talking
about. I was describing how to make a real progress bar so if it said 80%,
it was 80%. This is not an easy thing to do but it can be done :)
Jay
----- Original Message -----
From: "Andy Woolley" <andy@milonic.com>
To: "Jason Lavigne" <jlavigne@stonecroft.net>; "Miles Thompson"
<milesthompson@sprint.ca>; <murph@murphatnight.com>
Cc: <php-general@lists.php.net>
Sent: Friday, December 08, 2000 8:03 AM
Subject: Re: [PHP] Progress bar?
> 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
> >
> >
>
--
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