Before I mention anything.. plz read this and decide if you cant handle it another way.
http://www.usatoday.com/life/cyber/tech/2001-05-29-mousetrapping.htm Here are several options: 1) Use location.replace for all your links/actions. ex: <A HREF="javascript:location.replace('nextpage.html')">Advance</A> 2) Use a window.open() and kill the last window for all your links/actions This is not as good because IE sometimes will warn the user that the window is trying to close and ask if the user will allow it. 3) Use a session variable that you set with a code that all pages check to see if they should display themselves. This is a very easy option and I've use this with a bit table before. Create a singleton class w/ static variables that map to bit values. So if you have 3 pages: public class PageCodes { public static final PAGE1 = 2; //00000001 public static final PAGE2 = 4; //00000010 public static final PAGE3 = 8; //00000100 // you know the rest } Benefits is that it is easy. Drawbacks.. if you add a page then you have to make coding changes. This you can get around w/ dynamic variable creation technics (XML config files etc...) 4) Trapping mouse clicks. MESSY There are other ways as well.. but these are the most popular. -Tim -----Original Message----- From: Omar Elprince [mailto:[EMAIL PROTECTED]] Sent: Friday, December 28, 2001 3:16 AM To: [EMAIL PROTECTED] Subject: Re: Disabling Back & Forward Buttons of IE Hello I don't know why you need to disable the back and forward button but once i needed to disable the back button in a project. here it goes first you got to set your session for no cache response.setHeader("Cache-Control", "no-cache"); //for http 1.1 response.setHeader("Pragma", "no-cache"); //for http 1.0 then you can use include the page like in another directory <%@ include file="include/goout.html" %> in the goout.html you can add this using javascript <form method="PUT" action="results.jsp" name="theinsertForm"> </form> <script language="javascript"> <!-- document.theinsertForm.submit(); //--> </script> this will make the browser lose track of the back page and couse a deadlock if any one has a better idea please submit it :) >From: Ravi Soni <[EMAIL PROTECTED]> >Reply-To: A mailing list about Java Server Pages specification and >reference <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Disabling Back & Forward Buttons of IE >Date: Fri, 28 Dec 2001 10:56:34 +0530 >MIME-Version: 1.0 >Received: from [192.18.99.108] by hotmail.com (3.2) with ESMTP id >MHotMailBDF5509C004B40043721C012636CCFCE0; Thu, 27 Dec 2001 21:40:07 -0800 >Received: from swjscmail1 (swjscmail1.Sun.COM [192.18.99.107])by >swjscmail2.java.sun.com (Postfix) with ESMTPid 1D3B3220C8; Thu, 27 Dec 2001 >22:38:26 -0700 (MST) >Received: from JAVA.SUN.COM by JAVA.SUN.COM (LISTSERV-TCP/IP release 1.8d) >with spool id 853806 for [EMAIL PROTECTED]; Thu, 27 Dec >2001 22:37:35 -0700 >Received: from watchman.quark.co.in (unknown [12.3.72.51]) by >swjscmail1.java.sun.com (Postfix) with ESMTP id 76093480A for ><[EMAIL PROTECTED]>; Thu, 27 Dec 2001 22:27:26 -0700 (MST) >Received: by SARASWATI with Internet Mail Service (5.5.2653.19) id ><YNR5R4LV>; Fri, 28 Dec 2001 10:56:35 +0530 >From [EMAIL PROTECTED] Thu, 27 Dec 2001 21:40:47 -0800 >Delivered-To: [EMAIL PROTECTED] >X-Mailer: Internet Mail Service (5.5.2653.19) >Message-ID: <6A9AC06CAB51D4118A6A0000E898F2E40366F1B7@SARASWATI> >Sender: A mailing list about Java Server Pages specification and reference ><[EMAIL PROTECTED]> > >Hi All, > > I want to disable Back & Forward Buttons of IE in my application. > >Can anybody suggest any wayouts. > >Ravi > >=========================================================================== >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff >JSP-INTEREST". >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST >DIGEST". >Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com _________________________________________________________________ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
