My options to $(form).ajaxSubmit(…) include:
type : "post",
dataType : "text",
no jsonp. No json, even.
However, there is a file upload. This causes jquery forms to use an iframe, which I suspect is the source of my problem. To whit: when my service returns 404 from the post (which I can see in the chrome dev tools), my success function is called.
I’m using jquery 1.7. I’ve tried the global statusCode handler suggested by 3nigma, it’s not called.
Is there any way to catch the actual HTTP status code in this case?
Relevant Plugins in use:
- malsup’s jquery forms (http://jquery.malsup.com/form/) — no version number in the file.
- jQuery Validation Plugin 1.8.0
UPDATE
Updating to very latest jquery.form.js fixed this.
you can define a global default in
ajaxsetup