salute Mr. test
> According to the information I found, the object can only be
> in five states (shown below). Is it possible to see how much
> data has already been recieved when the object is in state 3?
>
> XMLHttpRequest.readyState:
> ...
> 3 Some data has been received. Calling the responseBody and
> responseText properties at this state to obtain
> partial results will return an error, because status
> and response headers are not fully available.
... and yet it is worth a try to access some of these informations.
listen to the [[XMLHttpRequest]] objects "onreadystatechange".
as long as the objects "readyState" returns its interactive status 3
try to read the objects "responseStream.length" property and as this
fails the objects "responseText.length" property as well.
when I did research in order to script just another XMLHttpRequest
interface I found "responseStream" only (no other reference states
something to "responseStream") at
[http://msdn.microsoft.com/library/en-us/xmlsdk/html/b7e71bd4-a425-4346-b2a1-2c0c12cbddde.asp?frame=true]
and I implemented it - but my test running in MSIE always switches
to the "responseText.length" fallback.
now you got the information about the objects "bytesLoaded".
you will receive the objects "totalBytes" as result of the following
header query: [[XMLHttpRequest]].getResponseHeader("Content-Length");
the rest simply is Math.
you might countercheck my test as a feasibility study at
[http://www.pseliger.de/testCases/dhttp-xmlhttprequest-interface.dev.html]
so long - peterS.
Received on Mon May 1 04:33:46 2006