I am using jQuery 1.6 and I would like to know and understand how I can access response xhr
, status
and ex
variables in the following code:
$jQuery.ajax({
type: "POST",
url: "<some_url>",
error: function(xhr, status, ex) {
var msg = "";
if (xhr) {
msg = "readyState is " + xhr.readyState + ". ";
}
if (ex) {
msg += ex.name + ' - ' + ex.message;
}
alert("ERROR " + msg); }
success: function(jqXHR, status, ex) {
...
}
});
How can I know the full list of all them "accessible" values like, for example, readyState
for the xhr
(xhr.readyState
), name
and message
for the ex
(ex.name
and ex.message
)?
Moreover, what xhr
and ex
variables represent (I think status
refers to the HTTP status code)?