Welcome to iPadForums.net Guest - Click Here to Register

Ajax HTTPS POST call does not work in iPad

This is a discussion on Ajax HTTPS POST call does not work in iPad within the iPad Development forums, part of the iPad App Store category; 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 ...

iPadForums.net is the original Apple iPad Forum! Registered Users do not see these ads. Please Register - It's Free!
+ Reply to Thread
Results 1 to 1 of 1
  1. #1
    iPad Noob!
    Member #
    89583
    Join Date
    Aug 2011
    Location
    India
    Posts
    1

    Ajax HTTPS POST call does not work in iPad

    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!

  2. Ads



Home | Forum | Active Topics | What's New

Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. https sites
    By RAC in forum iPad General Discussions
    Replies: 2
    Last Post: 07-13-2012, 05:59 AM
  2. How can use my sim in ipad to call and sms
    By Smksalmi in forum iPad 2 Forum
    Replies: 1
    Last Post: 05-05-2011, 04:51 PM
  3. Call the USA on iPad-For Free
    By chesterhound in forum International iPad Users
    Replies: 5
    Last Post: 04-25-2011, 01:22 PM
  4. HTTPS server is not responding error
    By dawgpound in forum iPad Help
    Replies: 1
    Last Post: 04-15-2011, 04:29 PM
  5. How to call from ipad using the gsm
    By Yogesh.dandawate in forum iPad Apps
    Replies: 3
    Last Post: 03-31-2011, 02:42 AM

Search tags for this page

ajax not working on ipad
,
ajax post in ipad
,
ajax post on ipad
,

does ajax work on ipad

,

ipad ajax not working

,

ipad http post

,

ipad https

,

xmlhttprequest ipad

Click on a term to search for related topics.

Tags for this Thread