whilst you cannot disable the browser back buttons, you can add onbeforeunload event which will allow you to add functionality before the page is left.
I used this to add a confirmation box to notify users that leaving the page would lose any unsaved changes.
Note though that you cannot attach this to just the back button, and whenever the user tries to leave the page via a link/forward/back/reload, they would get the message.
Sean
I love this place!
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
6
posted
0
guessing you have a typo in your code above since histroy is misspelled.
If you use proper headers and posts, you can expire a page when the back button is pressed.
Eric
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: To Disable Back button in all the browsers