ajax status code

JavaScript
$.get( "ajax/test.html", function( data ) {
  $( ".result" ).html( data );
  alert( "Load was performed." );
});
fail: function(xhr, textStatus, errorThrown){
	alert('request failed');
}
Source

Also in JavaScript: