|
-
Jun 6th, 2012, 09:44 PM
#1
Thread Starter
Hyperactive Member
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
If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.
If you fail, try and try again, its the only way to success.
-
Jun 10th, 2012, 05:20 AM
#2
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.
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|