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!

redirect on back button

Status
Not open for further replies.

kss444

Programmer
Sep 19, 2006
306
US
Hi all,

I need to redirect our users to our login page if they click on the back button.
I am not sure how to code this, I need it to work in IE and FF.

I was using:
<script type="text/javascript" language="JavaScript">
<!--
//used to prevent user from using the back button

javascript: window.history.forward(1);
//-->
</script>
But they want the user to go back to the login page.
Thanks,
kss

Ordinary Programmer
 
Hi

There is no way to detect that.

By the way, the BAck toolbar button is only one possibility to trigger the navigate back functionality. There are also the History menu's Back command, the context menu's Back command and the Alt-Left arrow key. And the extensions can add their own ways, for example with FireGestures you can map the back functionality to various drag gestures, wheel gestures and rocker gestures.

Better tell us why would you want to do that.

Feherke.
 
Have to. Managers want it, the end users want it and the code specs ask for it.

Ordinary Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top