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..
- var options = { success:showResponse};
- function submitForm()
- {
- $("#trackingDetForm").ajaxSubmit(options);
- }
- function showResponse(responseText, statusText, xhr) {
- alert(xhr.status);
- }
Regards