1

For phonegap development:

  1. is it possible to fetch remote data for phonegape?
  2. is it possible to fetch remote json/xml file using ajax/jquery ?
  3. XmlHttpRequest can fetch remote xml file ?

also any suggestion for it or important link.

1 Answer 1

3

Ajax works no different that it does else where execept that cross domain calls are ok with phonegap,
see my other answer

Example of jquery ajax call @ http://api.jquery.com/jQuery.ajax/
Parsing xml with javascript @ http://www.w3schools.com/xml/xml_parser.asp


$.ajax({
  url: "test.html",
  context: document.body,
  success: function(){
    $(this).addClass("done");
  }
});

Example of native javascript call

Ref from phonegap about ajax
(see question:

Q. I want to create an application for phonegap to access externally deployed web services via AJAX. How can i resolve the issue with the cross-domain security policy of XmlHttpRequest?)

True to life example on this site

This should be enough to get you started. Let me know if you have any other questions.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks a lot for all the information link and example, now i am clear about this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.