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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s