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,
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:
>
> $
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
3 matches
Mail list logo