• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Controlling the browser appearance using a JSP-html form

 
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
reply
    Bookmark Topic Watch Topic
  • New Topic