Marked OT... this isn't Struts-related...

There isn't any way to do it cross-browser that I am aware of, and there isn't any way to do it definitively. However, because you say you are working on an Intranet application, you may have some options that you otherwise might not...

First thing, spawn a new window for you app with no chrome. This will remove the Back button, and the menus that will allow you to access it, leaving just keyboard shortcuts.

If you can develop for IE-only, here's something I have found works... throw this in your onLoad handler...

document.onkeydown=function(e){if(event.srcElement.type=='text'||event.srcElement.type=='textarea'){return true;}else{return false;}};

This will block the back shortcut. Amazingly, it also seems to block reload, and mouse clicks (i.e., if you have the middle mouse button mapped to back, as I do). In other words, it seems to pretty well block everything that you might be interested in blocking :) But again, it is IE-only.

Don't forget too that many will argue that this is terrible web design. I happen to disagree, but there are very reasonable arguments to make that this is a bad idea. Make sure it's what you really want and need.

Frank

struts lover wrote:
Hi,
I am using Struts and Tiles for an intranet application. I want to disable the back button. How can I achieve this? Any help would be appreciated. Thanks

                
---------------------------------
 Yahoo! Mail
 Use Photomail to share photos without annoying attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to