Re: Updating HTML on page
| From: | TG | Date: | Tue, 06 Apr 2010 02:47:59 +0000 |
| Subject: | Re: Updating HTML on page | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-303845@lists.php.net to get a copy of this message | ||
The only way to do it with PHP alone would be to control the output
buffering and I've found that to be inconsistant in quality and
predictability with different browsers even web servers. I'm sure
there's an art to getting that all working well with various technologies
that are involved in the script -> client caching and processing, but why
mess with iffy when you can use a proven technology like AJAX.
Get familiar with jQuery (or one of the other big JS libraries, but jQuery
is my choice hands-down) and you'll probably find it's pretty easy.
-TG
----- Original Message -----
From: "Ashley M. Kirchner" <ashley@pcraft.com>
To: <php-general@lists.php.net>
Date: Mon, 5 Apr 2010 20:12:30 -0600
Subject: [PHP] Updating HTML on page
> I have a PHP script that queries a DB to get a list of image names. Then
it
> processes each name and generate thumbnails and what not. What I want to
do
> is have a page called (through the browser) which updates as the PHP
process
> in the background is working. So when you first pull up the page it will
> say 'There are x images to process' and then dynamically update the page
> with a progress status. In its crudest form it should say something like
> 'Processing 1 of 5 images .' When that image is done, it should update
the
> page with 2 of 5 . etc., etc. Ideally without refreshing the page each
> time.
>
>
>
> Is this where I need to figure out Ajax and incorporate it with PHP?