[jQuery] Re: Form plugin returned XMLHttpRequest

2007-08-01 Thread Mike Alsup
That's true. Form uploads don't actually use the XHR. A mock one is created by the form plugin so that all appropriate events can be simulated, but the "Content-Type" header won't be available. The "dataType" settings option drives how the response is handled, so you might as well use that too,

[jQuery] Re: Form plugin returned XMLHttpRequest

2007-08-01 Thread x0nix
Thanks, thats what I was looking for. But it seems not to work when a file is uploaded. Any ideas how to get header in that case? On Jul 25, 12:47 am, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > You can defined a "complete" handler. This handler is passed the XHR > and status. For example: > > $

[jQuery] Re: Form plugin returned XMLHttpRequest

2007-07-24 Thread Mike Alsup
You can defined a "complete" handler. This handler is passed the XHR and status. For example: $('form').ajaxForm({ complete: function(xhr, status) { var ct = xhr.getResponseHeader("Content-Type")); alert("content type is: " + ct); } }); Note that this is possible because