|
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!!
Navigation:
[Reply to this message]
|