Javascript Back Button - Stop the initial load of back button from working
- by Evan
Hi,
I'm using a javascript back button link and forward button link to control the user's history inside a modal/lightbox window.
The challenge I have is when the modal window is launched, and the "back" and "forward" buttons are present for the user to click, if the initial javascript back button is clicked when the window opens, it actually closes the modal window, because the javascript history is taking the user back to the page PRIOR to the opening of modal window.
So, in essence, I'm trying to disable the "back" button from working on the initial load of the modal/light box.
<a href="javascript:history.go(-1)">Back Button</a>
<a href="javascript:history.go(1)">Foward Button</a>
Is this possible?