This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have one HTML file and it contains 3 pages -
page 1: a user input page;
page 2: a read only verify page for user to verfy details entered page 1
page 3: a confirmation message
Page 2 has an edit button in case user made a typo. I've coded the edit button so when clicked it goTos page1.
For example I have an input field of userName and the user types 'Ed'. They select continue and page 2 is shown with 'Ed' displayed in read only mode. The user decides 'Ed' is not right and they choose to edit. Page 1 is reloaded and user now enters 'Edward'. On hitting page 1's continue, page 2 is displayed for the second time but 'Ed' is still displayed. If i then select confirm page 3 does display 'Edward'. When i debug I notice the second time in to page 2 the breakpoint is not hit in the function so i'm guessing the page is being reladed from a cache.
So as I'm new to this I was wondering if there is a good tutorial on when to use goTo, goBack and how to ensure the page is reloaded but you can still pull in the old content the user entered. I did try window reload but that reset everything.
I'm confused. If you have three "pages" in one HTML file, then what's all the "reloading"? The only reason to put multiple screens in one HTML is to be able to swap them out without needing to do any actual reloading.
Is this based on some mobile framework like jQuery Mobile, or are you rolling your own? (I know you mentioned jQuery, but jQuery and jQuery Mobile are very distinct products.)