HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 30th, 1999, 12:32 PM
finkej73
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Is there a way to disable the back button on a browser.

Reply With Quote
  #2  
Old September 4th, 1999, 04:56 PM
scollo
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
No.

You can use the JavaScript function location.replace() to prevent your pages from being added to the window's history object, but you can't disable Back.

<A href='javascript:self.document.location.replace("nextfile.html");'> Click here! </A>

Then when the user gets to nextfile.html, he or she can't use Back to get to previousfile.html.

--Chris

Reply With Quote
  #3  
Old September 12th, 1999, 01:09 PM
lacey
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
You can also disable it by leaving from a dummy page immediately to the real page. When users try to go back, they keep getting immediately pushed forward again.

Keep in mind that it is very user-unfriendly to do this except in very special circumstances.

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
<script language="JavaScript" type="text/javascript">
<!--
setTimeout ("leave()", 100);
function leave() {
document.location="http://129.81.84.119/";
}
//-->
</script>
[/quote]

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Disabling the Back button


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway