Solved

Disable the Back button of the browser

Posted on 1999-01-28
6
196 Views
Last Modified: 2010-04-09
I am using ASP, with vbscript. I want to know a way to disable the back key of the browser ( IE3 +).
2nd part of the question is I would like it to be disabled only if I am abc.asp and it reactivate if traverse to other pages from abc.asp. If I come back to abc.asp the back should get redisabled.
0
Comment
Question by:anuravi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 6

Expert Comment

by:PBall
ID: 1845777
Nosiree.. No can't do that.

Button might not be on screen, but people can still press Alt+<- or right click and click Back.

uh uh.
0
 
LVL 3

Author Comment

by:anuravi
ID: 1845778
No Sir,
I have seen some sites where I go to and cannot click the back button to get back to the calling page???

0
 
LVL 6

Expert Comment

by:PBall
ID: 1845779
Are those pages called on a different window?

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Accepted Solution

by:
jhurst earned 50 total points
ID: 1845780
You can stop the back from working by including a
<meta http-equiv="refresh" content="0; url=the_real_page">
at the start of a copy of the page that you want to disable the back button in.

So for example, if your page is called dog.htm you would place the above code in the dog.htm except that the url= would become url=cat.htm.

Now, when the user selects dog he is immediately re-directed to cat.  If he hits a back in cat he will arrive at dog, but this will send him straight to cat again.  So he can not get back.  

This is why most people who use the <meta will set a refresh time greater than 0 so that people can go back.
0
 
LVL 3

Author Comment

by:anuravi
ID: 1845781
Jhurst,
I guess you are making sense. Thank you very much for providing such beatiful answer. I would try this approach and if I have question would post the question again.
Thanks

0
 
LVL 3

Author Comment

by:anuravi
ID: 1845782
Pball,
If you see jhurst's message, you would get what I am meant by asking the question. Probably my question was misleading...
Thanks.

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Html split(text) Part2 6 41
Hta File displays dynamic File names 4 65
Save data in two Database, Asp 2 71
Check for Numeric Phone Field 14 48
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question