title: Using jQuery $.post with Phonegap (Cordova) for Android
body: <p>I have a Phonegap app that needs to post data to a remote server. However, when I try to use jQuery's $.post, it will never go into the callback.</p>
  
  <p>Here is my Javascript:</p>
  
  <pre><code>$(document).ready(function() {
      $('form').submit(function() {
          console.log('about to post');
          $.post('http://mysubdomain.mydomain.com/index.php', function(data) {
              console.log('In callback');
              console.log(data);
          });
      });
  });
  </code></pre>
  
  <p>When I run this and look in the Eclipse LogCat, I see "about to post" but I never see "In callback". I dumped this into a script tag in my PHP file on my server to make sure it is correct and sure enough, when I refresh the page I see the HTML show up in the Javascript console. I already whitelisted all domains in my config.xml file in res/xml, so I don't understand why this is not working. If anyone has any insight please let me know. Thanks!</p>