A normal page-flow with jQuery mobile looks somewhat like this:
- Starts on static page (foo.html)
- Clicks link
- End up on another static page (bar.html)
I need to alter this behavior. I’m looking for something like this instead:
- Starts on static page (foo.html)
- Clicks link
- Gathers json from server (based on i.e a how a form looks)
- Renders the other page (bar.html) based on the data gathered from the previous step
Normally, I’d simply do this via a PHP-script with POST/GET. However, the project is a PhoneGap project, so this isn’t an alternative.
One possible solution is if I somehow can point the first page’s form to the second one, hence the second one is able to pick up the first page’s post-parameters. This feels quite hackish, though. I’d also prefer to parse the second page before showing it, which makes even more complicated.
How can I achieve this behavior? Or rather; how to pass data between pages?
and then on newPage.html
Does this help you?