Solved

Back button clicked

Posted on 2001-07-06
6
192 Views
Last Modified: 2009-07-29
How do I know when the Back button on the browser has been clicked?
0
Comment
Question by:skwalsh
6 Comments
 
LVL 5

Expert Comment

by:Yog
ID: 6259222
When the user clicks the back button, you are already in the previos page or specified page and so you cant trap. You can capture the URL, and query params..at the top of eah page and will come to know if the user is in the same page or different..What finally you want to do
0
 
LVL 4

Expert Comment

by:epeele
ID: 6259423
If you want to "prevent" usage of the back button, you can add the following to your pages to force the browser to the most recent page in the history.  While you can't actually disable the back button, this effectively "disables" the back button by providing the same result of keeping the user on the current or subsequent pages.  

<script language=javascript>
  window.history.forward();
</script>
0
 
LVL 5

Expert Comment

by:Yog
ID: 6259440
hmm, if disabling back button is what you want answer is here
http://developer.irt.org/script/1522.htm
but you cant trap wheather the user clicked the back button - can do only as i said in my previour comment.

cheers.
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 20

Accepted Solution

by:
Silvers5 earned 25 total points
ID: 6259835
you can't.. but you can disable the back button as said above  more info:

You can't do it directly, but her's a work around:

<SCRIPT LANGUAGE=javascript>
{
 var Backlen=history.length;
 history.go(-Backlen);
 top.window.location.href ="YourPage.asp";
}
</SCRIPT>

or this:

<body OnLoad="window.history.forward();">

this way you disable the ability to move backwards.


also check this issue:

http://www.4guysfromrolla.com/webtech/111500-1.shtml
0
 
LVL 2

Expert Comment

by:Lunchy
ID: 6375912
Hi skwalsh

In the interest of maintaining the database of questions, it would be good if you could resolve your question.  Your options at this point are:

1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.

2. Award points to multiple experts--If you wish to award multiple participants, you can do so by creating a zero point question in the Community Support topic area, include this link and tell them which experts you'd like to award what amounts.

3. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

4. Delete the question because it is of no value to you or to anyone else. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

If you elect for option 2, 3 or 4, all you need to do is post right here as a comment, and I will take care of the rest.

PLEASE DO NOT AWARD THE POINTS TO ME. We also request that you review any other open questions you might have and deal with them as necessary.

Lunchy
Friendly Neighbourhood Community Support Moderator
Community Support:
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
0
 
LVL 2

Expert Comment

by:Lunchy
ID: 6395148
Force acceptance of Silvers5's comment
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP Sessions Being Cleared/Modified 6 81
Change visitor's REMOTE_ADDR to server's REMOTE_ADDR 2 32
Time Conversions...both ways 2 16
Weighted Randomizing 6 16
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

832 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