jQuery Form Plugin gets status code 0 though request succeeded
I'm running jQuery 1.7 and have the following piece of code using the jQuery Form Plugin's "ajaxSubmit" method:
- form.ajaxSubmit({
- url: "my/url",
- type: "post",
- dataType: "text",
- success: function (data, status, xhr, form) {
- if (xhr.status === 0) {
- //Handle odd case
- }
- else {
- success(data);
- }
- },
- cache: false,
- contentType: false,
- processData: false
- });
This request works perfectly in all browsers - it successfully hits my endpoint w/ the information contained w/in the form I provide. The endpoint runs w/o exception and returns. In Chrome, the status code is 200 (expected). In Ie7/8/9/10, the status code is 0 but the "status" field says "success".
What causes this odd status behavior? How can I fix/avoid it?