Reply to Re: Using AJAX, how can the page get state infomation from backgroud PHP script?

Your name:

Reply:


Posted by Marvin Zhang on 04/19/07 08:03

> The XMLHttpRequest object for using AJAX stuff has a property 'readyState'
> which can be:
>
> 0 // Uninitialized
> 1 // Loading
> 2 // Loaded
> 3 // Interactive
> 4 // Finished
>
> If I were to hack something you have in mind I would look at Loading and
> Interactive (not sure what the latter does)
>
> My guess is that if you address one of these while the page is loading and
> have PHP flush the buffer once in a while you could catch an XML node called
> 'loadedSoFar' or any output for that matter to poll the state of the page.

Hi,

Thank you for you reply.

I tried this method. Under Firefox, it works great. Every time the
server script calls flush(), the callback function of Ajax request
will be called with readyState set to 3. So I can update the progress
with the responseText variable. But unfortunately, this doesn't work
in IE. In IE, the callback will only be called only once with
readyState set to 3.

I hate IE!!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация