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 / using version 4/5 arrays in hiermenus 6

Using Version 4/5 Arrays in HierMenus 6

While we definitely do not recommend it, it is possible to utilize a version 4/5 array structure in HierMenus version 6. HierMenus version 6 does not natively recognize such arrays, but a special conversion script (HM_ConvertArrays.js) is provided in each HM 6 distribution that will translate the arrays on the fly into the format that HierMenus version 6 recognizes.

We do not recommend this approach for two main reasons:

  • It is less efficient. When HM_ConfigType is set to arrays, HierMenus must load not only the arrays themselves, but an additional script HM_ConvertArrays.js that dynamically translates the array structure into the standard configuration format. The additional script download and translation time are both unnecessary for configuration files that exist in the native HierMenus version 6 format. The translation time, in particular, will need to be applied to every page of your site that includes menu displays. (The download time is not so critical, since typically after the first download of the scripts subsequent downloads will be retrieved from the browser cache.) While this translation time is very fast, it nonetheless is additional unnecessary time that can delay the initial display of your page or menus.

  • It will not support newer features. Many of the new parameters available in HierMenus version 6 were not available in the version 4/5 arrays, and you therefore will not be able to utilize them; at least, not without adding your own customizations to HM_ConvertArrays.js. While you're welcome to do so, we will not support such additional customizations.

Nevertheless, if you must utilize the older array format in your HierMenus version 6 implementation, follow these steps:

  1. Make sure HM_ConvertArrays.js is present in the HierMenus script directory on your Web server.

  2. Copy the global variable parameter settings (the HM_GL_xxx settings) out of your existing HM_Loader.js file, and paste them into the beginning of your HM_Arrays.js file. You cannot use the version 4/5 HM_Loader.js file in your HierMenus version 6 implementation, and transfering your global parameter assignments to the actual HM_Arrays.js file is the easiest way to ensure your original global settings are still recognized.

  3. With the exception of the menu left, menu top, HM_GL/PG_UponDisplay, and HM_GL/PG_UponHide (and the related evaluate upon tree show/hide menu array) parameters, JavaScript expressions should not be quoted. If they appear enclosed in outer quotes, you will need to remove the quotes before using the HM_Arrays.js file in HierMenus version 6. In the case of the above mentioned parameters, outer quotes are fine (and, in fact, recommended).

  4. Place your newly patched HM_Arrays.js file in the HierMenus configs directory on your Web server, and point HM_ConfigDir and HM_ConfigFiles to it (just as if it was a valid HM 6 configuration file)

  5. Set HM_ConfigType to arrays in HM_Loader.js.

Note that our conversion routine is less forgiving than HierMenus version 4/5 were; if you have any syntax errors such as missing or additional commas following your array entries the conversion script may not process your old arrays file properly. If you are having trouble with the arrays, be sure to double check their syntax for possible errors (even if the arrays appeared to work properly in HierMenus 4/5).

Further information:

HM_ConfigType
HM_ConfigFiles
HM_ConfigDir



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/usingarrays.html