1. Home
  2. Computing & Technology
  3. JavaScript

Disabling the Netscape 7 Menu Bar

Join the Discussion

Questions? Comments?

Web Page Encryption

Custom Decryptor HTML Encrypter

Just about any web page encryption can be bypassed using the Save Page As item in the File menu of Netscape 7. I haven't found any page encryption program that handles this situation which means that they are all open to having their page code decrypted in Netscape 7 in about 15 seconds. The only way of blocking this decryption method is to block your visitors access to the menu if they are using that specific browser. The following script will do this:

function sm() {if (ns7menu()) window.menubar.visible=true;}
function hm() {if (ns7menu()) window.menubar.visible=false;}
function ns7menu() {
var agt=navigator.userAgent.toLowerCase();
return agt.indexOf("netscape/7.0") != -1 && window.menubar;
}

All you need to do to get the menu to disappear when your page opens and reappear when it closes is to add onload="hm();" onunload="sm();" to the body tag of your page.

I recommend adding this code to your page before you encrypt it. Of course it will still be possible to decrpyt your web page but not quite so quickly.

Note that this page is copied from the "Ask Felgall" website with the permission of the copyright owner.

Explore JavaScript

More from About.com

  1. Home
  2. Computing & Technology
  3. JavaScript
  4. Controls and Widgets
  5. Disabling the Netscape 7 Menu Bar

©2008 About.com, a part of The New York Times Company.

All rights reserved.