Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Controlling the browser appearance using a JSP-html form

 
M Burke
Ranch Hand
Posts: 399
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When my JSP's and html's are displayed in the browser, I want the back and forward buttons removed from IE. Is there a way to do this? Perhaps a meta tag?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, the user retains control of the browser (as it should be).
The best you can do is use Javascript to open a new window without the toolbars.

The folks in the HTML/Javascript forum can give you the exact syntax for this.
 
M Burke
Ranch Hand
Posts: 399
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do know about window.open(). The problem is, I am using servlets to open JSP's and navigate through the windows, not JavaScript.

Another thought, is it possible to reset the browser history so when they hit the back button they will stay on the current page?

Or, somehow detect the back button event and prevent it from navigating away from the current page?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There isn't a web developer alive who hasn't, at one time, wanted to disable the back, forward, and refesh buttons.
The specs and all browser implementations have, rightly, refused to take this control from the end user.

The best thing to do is code around the fact they will always be there.
 
M Burke
Ranch Hand
Posts: 399
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gee, I miss the MFC days when we had real power

I have another idea, I will go to the JS forum. Thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Picture trying to browse the web if every nefarious site you 'accidentally' stumbled into had the power to disable your back button.
 
M Burke
Ranch Hand
Posts: 399
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I know. For pub sites it would be a pain. But the app is on a company lan, so it's ok.

I did find an answer. This only works for IE 6x. Use a stub to launch the app.

<html>
<body>

<script type="text/javascript">
window.open('index.jsp', 'new',
"resizable=yes,scrollbars=yes,status=yes");

self.opener=self;
self.opener.close();

</script>

</body>
</html>
[ April 19, 2005: Message edited by: M Burke ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic