1

I am working with jquerymobile on a mobile app. This mobile apps works together with a web service. I call the web-service with user data to authenticate myself and then I want to display the returned data on the next page.

At the moment I have a button on the page with calls a javascript method that sends a post request to my web-service and then directs me to the next page depending on the result of the web-service call. All that works fine but I have no idea how to display data from my webservice on page2.

All I could find are some ways to pass some static parameters via $.mobile.changepage($("#page2"))

tagorsim
  • 15
  • 2
  • 9
  • I think you can only send data when using an AJAX page change. This can be done by the `data` option. – BenM Feb 07 '13 at 09:46
  • My understanding was, that that is only possible when refering to an external url. My page consists of a few divs so there are no external urls. – tagorsim Feb 07 '13 at 09:51
  • You can also do it without ajax page DOM loading, you will need to use localstorage. Take a look at my answer. – Gajotres Feb 07 '13 at 09:52

1 Answers1

2

Take a look at my ARTICLE, or find it HERE, there you will find 4 method of passing data during page transitions. Search for chapter: Data/Parameters manipulation between page transitions, you will also find a few examples.

Community
  • 1
  • 1
Gajotres
  • 57,309
  • 16
  • 102
  • 130