Please Note:
HierMenus is protected by copyright laws. Use of the HierMenus code requires a paid licensing agreement.
Click Here to Register

Site Navigation
Bulletins
About
Documentation
FAQ
Samples
Known Issues
Technology Jobs

internet.commerce

Partner With Us














          
internet.com

IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

 
HierMenusCentral Enhance the Functionality of Your Web Site with DHTML HierMenus.
    

home / documentation / setup / Disabling HierMenus for a Browser Family

Disabling HierMenus for a Browser Family

Many of the newer features in HierMenus version 6 are not available in older browsers (especially Netscape 4.x), which means if you want to support Netscape 4.x and use the newer parameter settings, you may find that you need to supply a lot of conditional code in your parameter settings (see the Using Classes Mini Tutorial for an example of this). Alternately, you could simply provide a separate configuration file for Netscape 4.x:

if(typeof(window.HM_ConfigFiles)=="undefined")
   HM_ConfigFiles = (HM_NS4)?"HM_ConfigNS4.js":"HM_Config.js";

Each of these solutions, however, requires some additional maintenance on your part. And, given the dwindling market share of the oldest browsers, you may feel that the maintenance isn't worth the effort. In that case, we recommend simply disabling the browser from loading the HierMenus scripts altogether.

To disable Netscape 4.x from HierMenus, find this line in the HM_Loader.js file:

if(HM_IsMenu) {

And change it to look like this:

HM_IsMenu = (HM_NS4)?false:HM_IsMenu;
if(HM_IsMenu) {

Which simply says, "if the browser is Netscape 4.x, do not load the scripts. Otherwise, proceed normally as you would have."

You can also disable each of the other three browser families, if you prefer; though disabling any one of the others would be fairly rare (since most features are supported in them). The following code, for example, diables all browsers from HierMenus loading:

// disable Netscape 4.x:
HM_IsMenu = (HM_NS4)?false:HM_IsMenu;
// disable Internet Explorer 4.x:
HM_IsMenu = (HM_IE4)?false:HM_IsMenu;
// disable Opera 7.x:
HM_IsMenu = (HM_Opera)?false:HM_IsMenu;
// disable all others (IE5+, Moz, NS 6+, etc)
HM_IsMenu = (HM_DOM&&!HM_Opera)?false:HM_IsMenu;
if(HM_IsMenu) {

Of course, it would be pointless to include all of these; but you are free to pick and choose those that you would like to disable.

If you need to more specifically exclude a particular browser from HierMenus, contact us and we'll see what we can come up with for you.



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Created: 3/25/2004
Updated: 3/25/2004
URL: http://www.hiermenuscentral.com/documentation/setup/disabling.html