1. Due to the recent site upgrade, the iPadForums (iPF) App will no longer work. The new iPadForums.net website has been designed from the ground up to work perfectly from any mobile, tablet, or desktop computer using the built in internet browser. Create a shortcut to iPadForums.net on your home screen by following these steps: Create an icon for iPadForums.net

Ajax HTTPS POST call does not work in iPad

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

  1. SubbuEatsApple
    Offline

    SubbuEatsApple iPF Noob

    Joined:
    Aug 18, 2011
    Messages:
    1
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    India
    Ratings:
    +0 / 0
    Hi,

    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);
    xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    var myform = document.forms[0];
    var reqBody = getRequestBody(myform);
    xmlhttp.send(reqBody);
    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