Retrieves the friendly HTTP status of the request.
Syntax
[ sStatus = ] XMLHttpRequest.statusText
Possible Values
sStatusString that receives the HTTP status of the request.The property is read-only. The property has no default value.
The property is read-only. The property has no default value.
Remarks
statusText was introduced in Windows Internet Explorer 7.
Example
The following script checks the status to determine if the request was successful: oReq.open("GET", "http://localhost/test.xml", false); oReq.send() if (oReq.statusText == "OK") alert(oReq.responseText); else alert(oReq.statusText);
The following script checks the status to determine if the request was successful:
oReq.open("GET", "http://localhost/test.xml", false); oReq.send() if (oReq.statusText == "OK") alert(oReq.responseText); else alert(oReq.statusText);
Standards Information
This property is defined in The XMLHttpRequest Object (W3C Working Draft) .
Applies To
XMLHttpRequest
See Also
status