HierMenus CENTRAL: HierMenus In Progress. HierMenus 5.0 Release Notes (2/7) | WebReference

HierMenus CENTRAL: HierMenus In Progress. HierMenus 5.0 Release Notes (2/7)

To page 1current pageTo page 3To page 4To page 5To page 6To page 7
[previous] [next]

HierMenus 5.0: New Parameters

For single window (i.e., no frames) sites, setting up HM5 is nearly identical to the setup process for HierMenus version 4. All of the global, page specific, and array specific variables supported in HM4 continue to be supported in HM5, and full setup instructions for HM5 can be found here. A pair of new parameters in the HM_Loader.js file, however, will need to be configured for all HM5 implementations.

HM_ScriptDir and HM_GL/PG_ImageDir

One of our frequently asked questions for HM4 involves the placement of the HM scripts and images on the Web site. Specifically, many users are confused by the loading of the scripts and mistakenly think that the scripts must be duplicated and placed into every directory of the site in order to work properly. You can house the HM scripts in a single directory of your site; and in fact, this is the scenario that we strongly recommend. We've previously addressed this concern in FAQ entry #5; which describes the necessary modifications to the HM_Loader.js file to allow the storage of your scripts in a centralized directory.

With HM5 we've made this process even simpler, via the addition of two new parameters in the HM_Loader.js file: HM_ScriptDir and HM_GL/PG_ImageDir.


 HM_ScriptDir

Description:
Identifies the location on the server where the HM Scripts (HM_ScriptDOM.js, HM_ScriptIE4.js, and HM_ScriptNS4.js) can be found. Though not strictly necessary, HM_Loader.js is usually located here, as well.

Value:
String, or JS expression resulting in a string, indicating the absolute or relative URL of the script directory ending in a slash. Can be an empty string ("") in which case the scripts must physically be duplicated into every directory of the site that contains a page or pages that will load the scripts (not recommended).

Comments:
This is a required parameter; it must exist in the HM_Loader.js file (even if it is empty).

When a URL is actually specified by this parameter, then it must always end in a slash (/).

Note that HM_ScriptDir is not a global or page specific parameter, it may be set only as described here and there are no "page specific" overrides for it.

Examples:
The scripts are located in the directory the HTML page that uses them is currently in (not recommended):

HM_ScriptDir="";
The scripts are located in a single central directory of the WebRef server:

HM_ScriptDir="http://webref.com/HMScripts/";
The scripts are located in the server's top level HMScripts directory (regardless of the domain name used to access the site):

HM_ScriptDir="/HMScripts/";
Default:
None. As noted above, HM_ScriptDir must be present in the HM_Loader File.


 HM_GL_ImageDir and HM_PG_ImageDir

Description:
Identifies the location on the server where the HM Images ("more" images indicating that a child menu is present, and top and bottom scroll bar images) can be found.

Value:
String, or JS expression resulting in a string, indicating the absolute or relative URL of the image directory ending in a slash.

Comments:
This parameter can be applied as a global (HM_GL_ImageDir, set in HM_Loader.js) or a page specific (HM_PG_ImageDir) parameter. Like HM_ScriptDir, the pathname used in this parameter must end in a slash (/).

This directory will be prepended to the actual image names themselves.

Examples:
The images are located in a single central directory of the WebRef server:

HM_GL_ImageDir="http://webref.com/HMImages/";
The images are located in the server's top level HMImages directory (regardless of the domain name used to access the site):

HM_GL_ImageDir="/HMImages/";
The images are located in the same directory as HM_ScriptDir:

HM_ScriptDir="/HMScripts/";
HM_GL_ImageDir=HM_ScriptDir;
Default:
The same directory specified in HM_ScriptDir


Now let's have a look at the new parameters specifically for cross-frames implementations.

To page 1current pageTo page 3To page 4To page 5To page 6To page 7
[previous] [next]

Created: April 22, 2003
Revised: April 22, 2003

URL: http://www.webreference.com/dhtml/hiermenus/inprogress/2/2.html

Justtechjobs.comFind a programming school near you






Online Campus Both