ajax status code code example
Example 1: get request jquery
$.get( "ajax/test.html", function( data ) {
$( ".result" ).html( data );
alert( "Load was performed." );
});
Example 2: jquery ajax on fail
fail: function(xhr, textStatus, errorThrown){
alert('request failed');
}