I am new to HTML 5. I am developing a phone gap application. In that my web services and database is on server and HTML pages are on device which is compiled through phone gap library.
When I execute HTML pages on browser I am getting proper output on browser but when I compile project through phone gap then and launch application on device there is no response. I traced the flow using alert messages in that i found that AJAX call to webservice is not working in device.
Can any one please tell me what to do in this case?
following is the code that I am using to call PHP webservices:
<!DOCTYPE html>
<html lang="en">
<head>
  <title>JSONP Echo Client</title>
  <meta charset="UTF-8" />
  <script>
    "use strict";
    function jsonp(url) {
      var head = document.head;
      var script = document.createElement("script");
      script.setAttribute("src", url);
      head.appendChild(script);
      head.removeChild(script);
    }
    function jsonpCallback(data) {
      document.getElementById("response").textContent = JSON.stringify(data);
    }
//jsonp("http://www.cjihrig.com/development/jsonp/jsonp.php?callback=jsonpCallback&message=Hello");
    jsonp("http://192.168.1.161/hotelTab/login1.php?callback=jsonpCallback&adminMasterUserName=admin&adminMasterPassword=admin");
  </script>
</head>
<body>
  <span id="response"></span>
</body>
</html>
 
     
    