Dwarakanath Jagadeesan
Dwarakanath Jagadeesan

Reputation: 109

Difference Between request.status and request.statusCode

I am learning AJAX and I wanna know the difference between the request.status and request.statusCode functions.

for example:

document.getElementById('erroDv').innerHTML = request.status;
document.getElementById('erroDv').innerHTML = request.statusCode;

Thanks in advance!

Dwarak

Upvotes: 1

Views: 316

Answers (1)

Sjoerd
Sjoerd

Reputation: 75679

  • status contains the numerical code, like 200 or 404
  • statusText contains the corresponding text, like "OK" or "Not Found"

Source

Upvotes: 1

Related Questions