title: JQuery AJAX call to web on iOS stopped working using Phonegap web app
body: <p>I have an app written in HTML5, Javascript, css3 using PhoneGap to compile for iOS and Android.  It collects survey information and uploads this via Ajax call to online host.  It has been working really well until recently the upload code appeared to stop working.  WELL NOT QUITE!  On the iPad it says successful but in fact nothing ever makes it to the host.  This is VERY strange.  I've tried re-writing the Ajax call based on articles on here but no luck.</p>
  
  <p>iOS - 6.1.3, PhoneGAP 2.7.0, PhoneGap/Adobe Build used.</p>
  
  <p>This is the upload piece...</p>
  
  <pre><code>function sendToWeb(){
  var errorflag = false;
  db.transaction(function (tx) {
      tx.executeSql("SELECT weburl FROM settings", [], function(tx, results){
          var webURL = results.rows.item(0).weburl;
              tx.executeSql("SELECT * FROM surveypretransfer WHERE uploaded = '0'",[], function(tx, results){
                  if (results.rows.length == 0) {
                      alert("You have no surveys waiting to upload");
                  } else {
                      alert("You have " + results.rows.length + " surveys waiting to upload");
                      for (var i=0; i &lt; results.rows.length; i++) {
                          var responseURL = webURL + "/feeds/saveinfo.php";
                          var responseString = results.rows.item(i).responsestring;
  
                          var localid = results.rows.item(i).id;
                          //alert(localid);
                          $.ajax({
                              type: 'POST',
                              data: responseString,
                              url: responseURL,
                              timeout: 30000,
                              success: function(data) {
                                  alert('Success!' + data.join('\n'));
  
                              },
                              error: function(data) {
                                  alert(data.join('\n'));
                                  console.log("Results: " + localid);
                                  alert("Error during Upload.  Error is: "+ data.statusText);
                              }
                          }); //ajax
                      }; //for loop
                      alert("You have successfully uploaded "+ results.rows.length + " survey results");
                      tx.executeSql("UPDATE surveypretransfer SET uploaded = '1' WHERE uploaded = '0'");
                  }; //if statement
              });  //tx.execute
      }); 
  }, errorCB);
  }
  </code></pre>
  
  <p>Neither of the two alerts fire when loaded on iPad.  Works fine on Android and has previously worked on iPad so I can't find what has changed.</p>
  
  <p>UPDATE:  Appears that this only applies to WiFi only iPads.  All the 3G ones I tested were fine.  Figure that!</p>
  
  <pre><code>Config.XML contains app id = "com.mydomain.myapp" (as an example)
  URL for upload is "http://customer.mydomain.com/feeds/saveinfo.php?..."
  Also added line 'access origin="http://mydomain.com" subdomains="true" '
  </code></pre>
  
  <p>Still no results.  Is anyone seeing/having similar issues?  Anyone see my mistake?</p>