Day: March 11, 2015

How to make Ajax request in PhoneGap using JQuery

webcoderecipes

  1. The url shud be something similar to http://ipAddress or domainName/ajaxDemo/json/sample.json?callback=jsonCallback
  2. the ipAddress should the be ip of the system, if its localhost or 127.0.0.1 or 192.x.x.x the call would fail.
  3. The response json shud be wrapped with a callback method name I.e jsonCallback in our case
  4. Datatype shud be “jsonp”
  5. Add an entry in  res/config.xml <access origin=”http://ipAddress or Domain name” subdomains=”true”/>

View original post