Getting status code from XMLHttpRequest object returned by ajaxSubmit

Getting status code from XMLHttpRequest object returned by ajaxSubmit

Hi,
I am submitting a form using ajaxSubmit and trying to read back the status code.
For a error case it is showing HTTP Status 404 in responseText but not xhr.status is undefined.
If i use complete callback then xhr.status 0
So how to handle case when there is some error like 404..

  1. var options = { success:showResponse};
  2.     function submitForm()
  3.     {
  4.             $("#trackingDetForm").ajaxSubmit(options);
  5.     }
  6.     function showResponse(responseText, statusText, xhr)  {
  7.         alert(xhr.status);
  8.     }
Regards