1

Can I use jquery ajax and call server side php files, return json from those php files, and update controls on the presentation layer of the ios app that I created using phonegap?

I know that a long sentence.

Example,

  • Server side php returns json, hello world.
  • Normal website uses ajax jquery calls the php, reads returned json, populates control on the webpage
  • Using phonegap I take this same web app for ios device
  • Will it work the same way as it did when it was a web app without phonegap making it "native"?

Thanks.

1
  • 1
    Yes you can and as long as you are not doing anything phonegap specific within that process it should work as a web app as well. PhoneGap in a nutshell just wraps your code into an embedded web browser. Commented Dec 7, 2011 at 19:44

1 Answer 1

2

Yes you can, basically you can make it look like a normal webpage, so you will need to make the Ajax call and then use some something to do the DOM manipulation task.

Take a look at this example using jQuery Mobile:

http://wiki.phonegap.com/w/page/36868306/UI%20Development%20using%20jQueryMobile

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

Comments

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.