| | |
How to disable back button and backspace using Javascript..?
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
You can't disable the back button. The best you can do is to open a new window with JavaScript and remove that toolbar. But if the page loads in a window with the toolbar you can't disable it.
You also can't disable the keyboard but you can use JavaScript to ignore certain keys from being acted upon. You need to intercept the event and then ignore it.
You also can't disable the keyboard but you can use JavaScript to ignore certain keys from being acted upon. You need to intercept the event and then ignore it.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Both of you need to read my post. I gave you the answer in there.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
That doesn't work for the back button since it isn't part of the web page.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
The "Back" button belongs to the user, not to you. You have no right to disable it, since it might be the only way the user has to return to the page he came from to get to your page.
I have seen people use such tricks as removing the toolbar or forwarding to a second page. These make me mad at the programmer, because he denies me the opportunity to complete my tree search of a Google request or another website.
I have seen people use such tricks as removing the toolbar or forwarding to a second page. These make me mad at the programmer, because he denies me the opportunity to complete my tree search of a Google request or another website.
Daylight-saving time uses more gasoline
The annoyance with the 'Back' button, I fear is not universal. There are cases (read Intranet applications) where the client has requirements for the web application to look like a desktop application, making the removal of toolbars necessary.
BalagurunathanS, the only way to disable the back button is to remove the entire toolbar in the way mentioned by Midimagic in his previous post.
BalagurunathanS, the only way to disable the back button is to remove the entire toolbar in the way mentioned by Midimagic in his previous post.
I don't accept change; I don't deserve to live.
For Intranet applications; it's much easier to control the browser being used to access the page... Open VB6, drop WebBrowser control on form, don't add any buttons that call the control's 'back' event; save; compile; backbutton-neutered IE6. Distribute to everyone onsite.
In any context, including Intranet applications, why should 'back' ever need to be disabled? Just accept it's there, and that it goes back ( to potentially anywhere ); and incorporate that into your plans. Don't overlook it up to the point that it becomes a problem.
In any context, including Intranet applications, why should 'back' ever need to be disabled? Just accept it's there, and that it goes back ( to potentially anywhere ); and incorporate that into your plans. Don't overlook it up to the point that it becomes a problem.
Last edited by MattEvans; Sep 14th, 2007 at 4:41 pm.
Plato forgot the nullahedron..
![]() |
Similar Threads
- How to disable Back button of IE when executing welcome.aspx page? (ASP.NET)
- Back button problem with $Sessions and GET (PHP)
- Form data & Back button (PHP)
- Using Back Button Refreshes Page (Web Browsers)
- Disable the Shut Down Button on the Welcome Screen (Windows tips 'n' tweaks)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Displaying RSS Feeds in Tabbed box on web page
- Next Thread: Beginner
| Thread Tools | Search this Thread |
ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate automatically beta box browser bug calendar captchaformproblem checkbox child class close column createrange() css cursor date debugger dependent disablefirebug dom download dropdown editor element embed engine error events explorer ext file form forms getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe images internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jump libcurl math media microsoft mimic object onmouseoutdivproblem onreadystatechange parent paypal pdf php player position post problem programming progressbar regex runtime scroll search security select shopping size software sql text textarea unicode w3c web website window windowofwords windowsxp wysiwyg \n






