views:

45

answers:

1

Hi, 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

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

Source

Sjoerd
How about the function request.statusCode?
The OP is asking about a property named "statusCode" not "statusText", although you may actually still be right that one is the code and one is the textual description.
Rob Levine