Skip to content Skip to sidebar Skip to footer

Javascript Backspace By Default Problem....going Back A Page

http://pastebin.com/N82ma0HN is my source code... here is the page: http://dev.icalapp.rogersdigitalmedia.com.rogers-test.com/Edit.php The issue I am having is when you type a lis

Solution 1:

On the keyup event of the input, handle the keyCode and if it was a backspace, simply stub propagation (bubbling) by return false;. When you backspace on an element, the keyup event is moved from the element to its parent, to its parent's parent, to its grandparent's parent element and so on. This is called bubbling. If you handle it, and return false;, you declare that you don't want it (the event) to be passed to parents. When a keyup reaches the body (or HTML, or document, or window), it fires window.history.prev() method, which moves one page back.


Post a Comment for "Javascript Backspace By Default Problem....going Back A Page"