Im using the location.replace() trick. Works ok though Id rather not have a back button at all!
Id hate to think about doing it using jsp though.(or indeed any other serial rendering mechanism). One would need to replace every link with some custom tag - and where the links themselves are rendered by some specialised tag already... hehe. Have fun. (Luckily my apps view is rendered not using jsp but by inserting dynamic content into an xhtml dom and serialising the result out. Adding a couple of lines of code to the end of the rendering pipeline to hunt down all <a> elements in the dom and rewrite their href to call a javascript method was a piece of cake. Took 5 minutes to implement - and this was halfway through the project when we already had hundreds of screens done!...) -----Original Message----- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Wednesday, 3 September 2003 16:41 To: Struts Users Mailing List Subject: Re: Is there a way to disable the browser's Back button without sending an http request? It depends on how much control you have over the users' browsers, and also how determined the users are to use their back-buttons. You can do lots of stuff in javascript like opening a new browser window without the button bar, or catching a back-button keypress and stuff like that. Actually I'm not sure about that last idea. They are all javascript solutions. I like your idea with location.replace() - it would never create any history, so the back-button at any point would take the user back out of the website. However it doesn't seem realistic to produce an extensive javascript mechanism on the browser just to stop the user using the back-button. Every problem that arises from use of the back-button is solvable in other ways, in my experience. Adam On 09/03/2003 05:52 AM Jing Zhou wrote: > It looks to me the answer is NO, although we could use Java script > location.replace('url'). But the statement sends out an http request. > > I would like to know if there is a different answer to it. > > Jing > Netspread Carrier > http://www.netspread.com > -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

