Ajax HTTPS POST call does not work in iPad

Discussion in 'iPad Development' started by SubbuEatsApple, Aug 18, 2011.

  1. SubbuEatsApple

    Expand Collapse
    iPF Noob

    Aug 18, 2011
    Thanks Received:

    We are developing a mobile app to be ported to the Android and IPAD platforms. The idea is to use the same code and create APK and IPA files as deployable apps for Android and IPAD respectively using Phonegap build process.

    The app makes an Async xmlHttpRequest call to a REST based HTTPS URL using POST Method. The response is in JSON format.

    The call works well from the app deployed on the Android platform and gets back with proper response and HTTP status code(200). But, the same app call fails from the IPAD. It returns an xmlHttpRequest response status code 0. Looking at this, there does not seem to be an issue of Cross-Domain here since the call from the app from Android works well to the same URL.

    Any ideas as to what could be the problem with the call in IPAD?

    Here is the code snippet used:

    var xmlhttp = new XMLHttpRequest();
    xmlhttp.open('POST', url, true);
    var myform = document.forms[0];
    var reqBody = getRequestBody(myform);
    xmlhttp.onreadystatechange = function() {
    // If state == 4, read the status code.

    Thanks a lot!

Share This Page

Search tags for this page
$ajax call from ipad not working
does ajax work on an ipad

does ajax work on ipad

ipad ajax calls
ipad httppost ajax
ipad onreadystatechange
ipad xmlhttprequest
json call not working on ipad
xmlhttp on ipad

xmlhttprequest ipad