[jQuery] Response Status Codes

[jQuery] Response Status Codes


Hi
All this time I was using AJAX natively. But now Im getting the hang
of jQuery.
I normally want to check if Im getting a 200, 404, 500 etc response
status on success
[code]
var xhr = NewXMLHttpRequest();
xhr.onreadystatechange = xhrChange;
function xhrChange()
{
switch (xhr.readyState)
{
case 1: // Open
break;
case 2: // Send
break;
case 3: // Receiving
break;
case 4: // Loaded
switch (xhr.status)
{
case 200: // OK
break;
case 404: // Not Found
break;
case 500: // Internal Server Error
break;
}
break;
}
}
[/code]
Looking at the docs (http://docs.jquery.com/Ajax/jQuery.ajax#options)
I see that :success and :complete can stand for case 4 and case 200
respectively.
But how do I get to 'know' the other status codes ?
Thanks