I am trying to do an ajax request $.ajax({type:"post",url:"download.php",error:function(data,status,err){alert(JSON.stringify(data));},data:"fileid="+fileid});
this request alerts "{"readyState":0,"responseText":"","status":0,"statusText":"error"}"
I have searched on google all i have come up with is a cross site ajax call(which this is obviously not)
I have tried putting the full url in and it does the same thing.
the only thing i can think of is the header and i don't know what would be wrong with it. Here is the request header from firebug Hostwww.mydomain.comUser-AgentMozilla/5.0(WindowsNT6.1;rv:5.0)Gecko/20100101Firefox/5.0Accept*/* Accept-Language en-us,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; charset=UTF-8 X-Requested-With XMLHttpRequest Referer http://www.mydomain.com/ Content-Length 8 Cookie PHPSESSID=27b7d3890b82345a4fc9604808acd928
I have added another request on a different page and it works just fine but this one keeps failing the header for the other request is: Hostwww.mydomain.comUser-AgentMozilla/5.0(WindowsNT6.1;rv:5.0)Gecko/20100101Firefox/5.0Accepttext/plain,*/*; q=0.01 Accept-Language en-us,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; charset=UTF-8 X-Requested-With XMLHttpRequest Referer http://www.mydomain.com/differentpage.php Content-Length 33 Cookie PHPSESSID=27b7d3890b82345a4fc9604808acd928