I'm new to Mobile development. I wrote a simple web app for mobile platforms which contains two HTML files: index.html, info.html. In the main page index.html, there is a hyperlink that allows user to navigate to the next HTML page: info.html like this:
<a href="info.html">Next</a>
Both these two HTML files are located in the same directory. I tested it in my desktop browser and it works fine. But problems occurred when I built and loaded the app to my Android smartphone. If I click "Next" link as given above in index.html, it will go the info.html page without any problems. But when I used the "Back" button on my smartphone, it got stuck there and didn't go back to the previous page index.html as expected. So what is the problem here? I'm using MoSync SDK for HTML web app development tool.
I don't have an android phone myself. Are you deleting the history by accident, if not try placing your own back button in it might not work but it could help.
Insert this code in the head of your HTML document:
Then insert this code where you want the button to appear:
To find out more about the javascript back button: http://www.w3schools.com/js/js_window_history.asp
I hope this helps.