$.ajax returns 0 as HTTP error code instead of 404

$.ajax returns 0 as HTTP error code instead of 404

Below is my ajax call from the HTML page.  Its actually a ajax call from an interation block.

In this I am expecting that a couple URLs will fail with HTTP code as 404.

From FireFox Net console i could see that the HTTP status as 404.  But the jqXHR.status is 0 (zero).

Could somebody please explain why its return 0 when the actual HTTP response is 404?
  1. $.ajax({
  2.         url: serviceURL,
  3.         type: "POST",
  4.         async: true,
  5.         crossDomain: true,
  6.         contentType: "text/xml",
  7.         context: tdObject,
  8.         dataType: "jsonp",
  9.         origin:window.location.protocol + "//" + window.location.host,
  10.         timeout:5000,
  11.         success: function(data){
  12.         //console.log("SUCCESS for ajax call ");
  13.         httpStatusCode=data.responseCode;
  14.   //return data.responseCode;
  15.         },
  16.         error:function(jqXHR, textStatus, errorThrown){
  17.         //console.log("Error for ajax call "+jqXHR.status+"-- "+textStatus+"--"+errorThrown);
  18.         httpStatusCode=jqXHR.status;
  19.         //return jqXHR.status;
  20.         }
  21.     });