readyState Property (ServerXMLHTTP-IServerXMLHTTPRequest)

 

Represents the state of the request.

lValue = oServerXMLHTTPRequest.readyState;  

Example

var XmlServerHttp;
XmlServerHttp = new ActiveXObject("Msxml2.ServerXMLHTTP.6.0");
XmlServerHttp.onreadystatechange = doServerHttpReadyStateChange;
XmlServerHttp.open("GET", "http://localhost/sample.xml", true);
XmlServerHttp.send();
function doServerHttpReadyStateChange() {
   if (XmlServerHttp.readyState == 4) {
      WScript.Echo("Done");
   }
}

lValue = oServerXMLHTTPRequest.readyState  

HRESULT get_readyState(long* pvarVal);  

Parameters

pvarVal [out, retval]
The state of the request, as an I4 (4-byte integer). The following values are defined.

(0) UNINITIALIZEDThe object has been created but has not been initialized because the open method has not been called.
(1) LOADINGThe object has been created but the send method has not been called.
(2) LOADEDThe send method has been called and the status and headers are available, but the response is not yet available.
(3) INTERACTIVESome data has been received. You can call responseBody and responseText to get the current partial results.
(4) COMPLETEDAll the data has been received, and the complete data is available in responseBody and responseText.

C/C++ Return Values

S_OK
The value returned if successful.

This property returns a 4-byte integer.

Implemented in: MSXML 3.0, MSXML 6.0

IServerXMLHTTPRequest-ServerXMLHTTP

open Method (ServerXMLHTTP-IServerXMLHTTPRequest)
responseBody Property (ServerXMLHTTPRequest-IServerXMLHTTPRequest)
responseText Property (ServerXMLHTTP-IServerXMLHTTPRequest)
send Method (ServerXMLHTTP-IServerXMLHTTPRequest)
status Property (ServerXMLHTTP-IServerXMLHTTPRequest)
statusText Property (ServerXMLHTTP-IServerXMLHTTPRequest)

Show: