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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, How can i time session for individual pages?

Status
Not open for further replies.

drizzt151

Programmer
Aug 10, 2001
5
US
I trying to find a way to stop a user from using his/ her Back browser button. I am very unsure on how to accomplish this. Please any help would be greatly appreciated.

Jason
 
put:

<script language=javascript>
history.go(1);
</script>

on all your pages. This will effectively disable the back button altogether.
penny1.gif
penny1.gif
 
the best place to put it is at the top of the page so I will be run first. You know cause HTML is a linear language.

Just do a response.write if you want to use code to do it. That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
This is the Code i have on my page am I still missing the Picture?

<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>

<html>
<script language=javascript>
history.go(1);
</script>
<head>
<title></title>
<meta name=&quot;GENERATOR&quot; content=&quot;Microsoft Visual Studio.NET 7.0&quot;>
<meta name=&quot;vs_targetSchema&quot; content=&quot; </head>
<body>
<P> </P>
<P><?xml:namespace prefix = asp />
<asp:label id=Label5 BackColor=&quot;Transparent&quot; Height=&quot;14px&quot; Width=&quot;173px&quot; ForeColor=&quot;Olive&quot; Font-Size=&quot;16pt&quot; Font-Names=&quot;Verdana&quot; runat=&quot;server&quot;> Welcome to the</asp:label></P>
<P>
<asp:label BackColor=&quot;Transparent&quot; Height=&quot;14px&quot; Width=&quot;173px&quot; ForeColor=&quot;Olive&quot; Font-Size=&quot;16pt&quot; Font-Names=&quot;Verdana&quot; runat=&quot;server&quot;>
<asp:label id=Label3 BackColor=&quot;Transparent&quot; Height=&quot;22px&quot; Width=&quot;655px&quot; ForeColor=&quot;Olive&quot; Font-Size=&quot;18pt&quot; Font-Names=&quot;Verdana&quot; runat=&quot;server&quot;> Art of Beauty Advanced Customer Care System
</asp:label></asp:label></P>
<P>
<a href=&quot;#&quot; onClick=&quot;MyWindow=window.open(' return false;&quot;>
Enter</a> </P>
</body>
</html>


Jason
 
You need it on the page where your user is not supposed to return to, as well.

There is no way to really disable the back button, so that little javascript always just moves them forward to the next spot in history if it's available, which is how this works. Click back, and the page you return to immediately returns you to where you came from.

It's sort of like:

BackForward
BackForward
etc...
penny1.gif
penny1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top