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.

status property

Retrieves the HTTP status code of the request.

Syntax

JavaScript

p = object.status

 

Property values

Type: Integer

The HTTP status code.

Standards information

Remarks

status was introduced in Windows Internet Explorer 7.

For a complete list of HTTP status codes and their meanings, see status Property (IXMLHTTPRequest).

Examples

The following script checks the HTTP status code to determine if the request was successful:


if (oReq.status == 401)
    console.log('Access denied.');
else
    console.log(oReq.responseText);

See also

XMLHttpRequest

 

 

Show:
© 2017 Microsoft