How can i disable backspace navigation with javascript
I have written an app in javascript with 2 divs, on load the 1st is visible and the 2nd is hidden. When a user completes the 1st div they then procced to the 2nd div, for usability if a user wants to go back i would like them to be able to use the backspace.
i have the code to catch the keypress of the backspace on the 2nd div and use it to go back to the 1st div.
However when i press backspace, the browser navigates to my previous page rather than to my 1st div.
thanks chris1990
Re: How can i disable backspace navigation with javascript
Have you tried returning "false" at the end in the keypress event ? Otherwise, the default behavior might occur.
:wave: