www.fgks.org   »   [go: up one dir, main page]

Skip Navigation Links
  

Internet Explorer Developer Center

Click to Rate and Give Feedback
Properties
 readyState Property
readyState Property New for Windows Internet Explorer 7

Retrieves the current state of the request operation.

Syntax

[ nState = ] XMLHttpRequest.readyState

Possible Values

nStateInteger that receives one of the following values.
0 (Uninitialized)The object has been created, but not initialized (the open method has not been called).
1 (Open)The object has been created, but the send method has not been called.
2 (Sent)The send method has been called, but the status and headers are not yet available.
3 (Receiving)Some data has been received.
4 (Loaded)All the data has been received, and is available.

The property is read-only. The property has no default value.

Remarks

You cannot call responseBody and responseText properties to obtain partial results (readyState = 3). Doing so will return an error, because status and response headers are not fully available. You must wait until all data has been received.

In comparison, the Microsoft XML (MSXML) version of the IXMLHTTPRequest interface exposes partial results through the responseStream property, which the Microsoft Internet Explorer native version does not implement. Be aware that this behavior also differs from the IServerXMLHTTPRequest World Wide Web link interface, which provides partial results to responseBody and responseText.

readyState was introduced in Internet Explorer 7.

Applies To

XMLHttpRequest

See Also

onreadystatechange
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker
DCSIMG