I'm developing mobile app with jquery mobile, and I find it hard to retrieve the data passed from page one to page two.
Here's the answer to a similar question: jQuery Mobile: Get data passed to page via changePage
But the solution is not quite clear, I still have some confusion:
- Why do I need to specify the data I want to pass in both dataUrl and data option? It's obviously redundant and confusing.
- If I need to retrieve data from dataUrl on second page, why bother to specify data option on the first page?????
- I did some tests, I can't find the data option passed to anywhere in the pagebeforeshow event handler of second page. It's not in event object, it's not in data object. Then where does the data option go? If it's not passed, why to specify it???
It's really confusing, please somebody with experience help!!