0

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?

2
  • Can you change the useragent/screen resolution in your PC browser and see if you can emulate the same error? Commented Dec 25, 2013 at 17:38
  • When i change the useragent to iPhone 3.0 in firefox on my pc, and it's works perfect. But when i try Electric Mobile Studio 2012, both iPhone and iPad has problem. Commented Dec 25, 2013 at 18:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.