I build a page for mobiles, but i have problem when i send a POST with jQuery.ajax on my phone. It's works on my PC but not on my phone.
I have this code when i make the post request:
window.jQuery.ajax({
type: "POST",
url: "/Action/PageHandler.ashx?do=" + method,
cache: false,
data : postFormData,
dataType: "json",
success: function (data) {
DataHandler.GetResult(data, callBack);
},
error: function (oXhr, status, msg) {
callBack(false, msg);
}
});
The response when i use my phone is this:
HTTP/1.1 200 OK
Server: ASP.NET Development Server/11.0.0.0
Date: Wed, 25 Dec 2013 17:20:00 GMT
p3p: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
Cache-Control: private
Content-Type: application/json; charset=utf-8
Connection: Close
Content-Length: 69
{"ErrorMessage":"Wrong pasword or username!"}
When i run this code on my phone, the error function is called, status = error and msg is empty. I use jQuery mobile.
What's wrong with my code?