title: Calling an api with ajax using jquery mobile in phonegap
body: <p>Actually I want to a call an php url with jQuery mobile ajax call in android phonegap. The possible outcomes of the url are </p>
  
  <ol>
  <li>if successs then -- valid</li>
  <li>if fails the -- Code:201</li>
  </ol>
  
  <p>I am using this code but it is not working help me. </p>
  
  <pre><code>        var request = $.ajax({
              url : "http://URL.com/api/validate.php?user=myUser&amp;password=myPassword",
              type : "GET"
          });
  
          request.done(function(msg) {
              $("#notification").text(request.val());
          });
  
          request.fail(function(jqXHR, textStatus) {
              alert("Request failed: " + textStatus);
          });
  </code></pre>