Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browser's Back Button

Status
Not open for further replies.

JulieM

Programmer
Jun 6, 2001
25
0
0
GB
Does anyone know how I can stop someone using the back button. Or if they do how I can stop them seeing what was previously displayed.
 
You're never going to be able to stop someone from using the back button. There are a few things you can do though. First, you could open a page in a new window, then close it on them when they've done what they need to do. Second, you have some variable set when the user does what he or she needs to do. When they go "back" to a previous page, check to see if that variable exists, if so, kick 'em out.

That's not it, but it might get you thinkin' in the right direction. Kevin
slanek@ssd.fsi.com

"Life is what happens to you while you're busy making other plans."
- John Lennon
 
JulieM,

With Javascript, you can do a location.replace(), which wipes the calling template from the history.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top