devxlogo

Disabling Netscape Toolbar Functions

Disabling Netscape Toolbar Functions

Question:
Is there any way with HTML, JavaScript, Javaor whatever to disable the “Back” and “Forward” buttons in the Netscape toolbar? As content on the Web enters the realm of real applications, screen traversalbecomes important. Hitting those buttons causenavigation issues and can confuse the user.

Answer:
There is no way to disable the toolbar from Java — for good reason. Keep in mind that Java is not tied to any particular browser or operating system, and therefore should not depend on the particular user-interface implementations of Netscape or Hotjava or Internet Explorer. There may not be a forward or backward button at all — stand-alone Java applications or Java’s Appletviewer certainly don’t have forward/back buttons and future browsers may have much more sophisticated navigation controls than just forward/back buttons.

The problem you mention is valid, however. How does one make it easy to use a real-life application on the Web without running into a UI disaster? For instance, when the user leaves the page, should the applet be killed or should it keep running but suspend itself? What if you bring up another copy of that page while the old instance of the applet is already running? One solution is to advise the user to spawn a new browser window for an applet that might stay on the screen for a while. This is rather clumsy especially because multiple browser windows clutter up the screen very quickly and are hard to manipulate.

Fortunately, Java does give the programmer quite a bit of control over an applet’s behavior as the user navigates the web. This is provided through three methods in the Applet class: start(), stop(), and destroy(). The programmer can override the default implementations of these methods to clean up or initialize the applet as needed.

The stop() method is called whenever the applet disappears from view – either because the user went to a different page or because the browser was iconified.The start() method is called whenever an applet is just about to start, or comes back into view — when the user clicks on the back button or when the browser is deiconified, for example. Finally the destroy() method is called whenever the applet’s page drops off of the user’s history list such that there is no way for the user to get back to the page by pressing the back button.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist