I am using the jQuery Form Plugin to process my forms, and a json file is being returned.
The problem I am having is that when using Uploadify, instead of the jQuery Form Plugin calling the success function, the browser instead tries to download json file.
This is the case in IE8, Firefox and Chrome.
Here are headers from a form without Uploadify:
Content-Encoding gzip
Vary Accept-Encoding,User-Agent
Content-Length 42
Keep-Alive timeout=5, max=100
Connection Keep-Alive
Content-Type application/json Request
Headers
Host ksl.crosbiedesign.co.nz
User-Agent Mozilla/5.0 (Macintosh;
Intel Mac OS X 10.6; rv:5.0)
Gecko/20100101 Firefox/5.0
Accept application/json,
text/javascript, /
Accept-Language en-gb,en;q=0.5
Accept-Encoding gzip, deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection keep-alive
Content-Type application/x-www-form-urlencoded;
开发者_Python百科charset=UTF-8
X-Requested-With XMLHttpRequest
Referer http://ksl.crosbiedesign.co.nz/dimensions/security_permissions
Content-Length 3829
Pragma no-cache Cache-Control no-cache
Here are the headers from a form with Uploadify
Date Thu, 07 Jul 2011 05:51:46 GMT
Server Apache/2.2.18 (Unix)
mod_ssl/2.2.18
OpenSSL/0.9.8e-fips-rhel5
mod_auth_passthrough/2.1
mod_bwlimited/1.4 FrontPage/5.0.2.2635
X-Powered-By PHP/5.2.17
Cache-Control no-cache, must-revalidate Expires Mon, 26 Jul 1997 05:00:00 GMT
Content-Encoding gzip
Vary Accept-Encoding,User-Agent
Content-Length 40
Keep-Alive timeout=5, max=100
Connection Keep-Alive
Content-Type application/json Request
Headers
Host ksl.crosbiedesign.co.nz
User-Agent Mozilla/5.0 (Macintosh;
Intel Mac OS X 10.6; rv:5.0)
Gecko/20100101 Firefox/5.0
Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language en-gb,en;q=0.5
Accept-Encoding gzip, deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection keep-alive
Referer http://ksl.crosbiedesign.co.nz/ksl/stockists/add
May be you should just change the Content-Type
of the response which corresponds to the request's Accept
header?
精彩评论