Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

statusText property

Retrieves the friendly HTTP status of the request.

Syntax

JavaScript

p = object.statusText

 

Property values

Type: String

The HTTP status of the request.

Standards information

Remarks

statusText was introduced in Windows Internet Explorer 7.

Examples

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")
   console.log(oReq.responseText);
else
   console.log(oReq.statusText);


See also

XMLHttpRequest
status

 

 

Show:
© 2017 Microsoft