Hi,
I'm creating a page where I want users to click on a link, and when they click on it, the current content of the page is replaced with new content (without actually leaving the same physical html page).
I'm doing this using the following javascript:
function ShowForm()
{
var ele = document.getElementById("Page1");
ele.style.display = "none";
var ele = document.getElementById("Page2");
ele.style.display = "block";
}
HTML:
<div id="Page1">
Fill out the following <a href="javascript:Showform();">form</a>.
</div>
<div id="Page2" style="display:hidden;">
Form
</div>
This works great except that since it's on the same page, the back button on the browser doesn't work. This is confusing to users since they don't know that the content is on the same html page.
Is there a way to allow enable to back button to work in this kind of setup, where hitting the back button will take them back to the Page1 content?
Thanks in advance!