- The url shud be something similar to http://ipAddress or domainName/ajaxDemo/json/sample.json?callback=jsonCallback
- 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.
- The response json shud be wrapped with a callback method name I.e jsonCallback in our case
- Datatype shud be “jsonp”
- Add an entry in res/config.xml <access origin=”http://ipAddress or Domain name” subdomains=”true”/>