|
|
Subject:
Disable back button in internet explorer
Category: Computers > Programming Asked by: shaneskillen-ga List Price: $100.00 |
Posted:
28 Sep 2005 19:50 PDT
Expires: 28 Oct 2005 19:50 PDT Question ID: 574062 |
What is the code to disable the back button in internet explorer? Some sites seem to trick it into thinking it's a refresh button. Survey sites like intelliquest.com have done it successfully | |
|
|
Subject:
Re: Disable back button in internet explorer
Answered By: leapinglizard-ga on 29 Sep 2005 12:03 PDT Rated: |
Dear shaneskillen, The trick is to use the history.forward() JavaScript directive in the head section of each page. Thus, when the user attempts to back up within your site, the script will bounce him forward each time. This method should only be used to guide the user through a linear interaction such as product purchase or survey completion, and not as a gratuitous way of forcing the user to stay on your site. In any case, the user can always leave by manually entering a new URL in the address bar. I have prepared the following page for you as a simple demonstration. Bounce Forward: Demonstration http://plg.uwaterloo.ca/~mlaszlo/answers/bounceforward/index.html The first time you visit this page, you will be able to use the back button to return to the previous site you visited. This is correct and desirable behavior. But as soon as you choose one of "foo!" and "bar!", which represents the beginning of a linear user interaction such as a purchase or survey, the back button is effectively disabled and you are forced to use the links offered on each page to navigate within my site. This effect is accomplished by including the following text in the <head> portion of each page. <script> history.forward(); </script> Remember, users will welcome this feature only if you employ it as a navigational help rather than as a hindrance. It has been a pleasure to address this question on your behalf. Regards, leapinglizard | |
| |
|
shaneskillen-ga
rated this answer:
and gave an additional tip of:
$10.00
Awesome - thanks! |
|
Subject:
Re: Disable back button in internet explorer
From: spenlow-ga on 28 Sep 2005 21:04 PDT |
Looks like it has something to do with Flash. If you go to this page, you can see how it works: http://intelliquest.com/corporate/left.html Hope this helps. |
Subject:
Re: Disable back button in internet explorer
From: amglasgow-ga on 29 Sep 2005 18:48 PDT |
I should note that a lot of usability experts feel that disabiling the back button is an impairment to users' ability to effectively use your website. See here: http://www.webdevtips.com/webdevtips/article.php?item=58 "Approximately 60% of Web users employ the back button as their primary means of navigation." By analogy, disabling the back button could be seen as an attempt to 'trap' users: "When you have visitors over, it's only natural to hope they'll stay awhile. But most people would consider it rude ? if not threatening ? if you locked the door when they tried to go." http://www.usatoday.com/tech/news/2001-05-29-mousetrapping.htm |
Subject:
Re: Disable back button in internet explorer
From: ogilvy-ga on 12 Oct 2005 08:18 PDT |
Great job! I'm looking for you! |
Subject:
Re: Disable back button in internet explorer
From: leapinglizard-ga on 12 Oct 2005 09:34 PDT |
Thank you for the rating and the kind tip. leapinglizard |
Subject:
Re: Disable back button in internet explorer
From: simplevivek-ga on 24 Feb 2006 04:12 PST |
Really a very neat and simple solution. |
Subject:
Re: Disable back button in internet explorer
From: jessehouston-ga on 14 Apr 2006 09:33 PDT |
Cool, but a website should never be JavaScript dependent or any scripting language dependent. |
Subject:
Re: Disable back button in internet explorer
From: veggie-ga on 17 Sep 2006 19:16 PDT |
Fantsatic Solution !! |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |