This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Servlets and the fly likes java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "java" Watch "java" New topic
Author

java

Raju Venuturupalle
Greenhorn

Joined: Mar 29, 2001
Posts: 5
How to disable browser's back button in java programming?
Pl assist.
rgds
raju
Aman Rustogi
Greenhorn

Joined: May 11, 2001
Posts: 22
You can use the location replace method when changing the location. This replaces the current history location with the new location. However older browsers do not support this method, which is why it is required to test for the images object:
<script language="JavaScript"><!--
if (document.images)
location.replace('http://www.somewhere.com/apage.html');
else
location.href = 'apage.html';
//--></script>
or
Use href="javascript:location.replace('url'); to disable the browser back button
cheers
Aman

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java
 
Similar Threads
c++ or Java--your suggestions please
class
J2EE
WA #2 ..... word association
zipping as self extracting exe