 |
Please Note:
HierMenus is protected by copyright laws. Use of the HierMenus code requires a paid licensing agreement.
|
|
 |

|
 |
 |
|
home / documentation / reference / hm_imagedir
HM_ImageDir
- Description:
- The server directory (folder) where the HierMenus "more"
images are stored.
- Value:
- String, empty string (""), or JavaScript expression that returns a
String/empty string.
- Applies To:
- Globally.
- Browser Compatibility:
- HM_ImageDir is supported in all browsers.
- Comments:
- HM_ImageDir is the server directory, specified as a valid
URL, of the location on your Web server where the HierMenus "more" images
are stored. This may be the same directory as your scripts and/or configuration files
or a different
directory altogether per your discretion. We recommend storing your more images
separately from your scripts and configuration files. HM_ImageDir has
no effect on images that you embed within menu items directly via the
<img> tag.
HM_ImageDir is a global variable that is set in the HM_Loader.js
file. It is not set in the configuration file as other
configuration parameters are, which explains why it is set using a standard JavaScript
assignment statement (via the = sign).
In the HM_Loader.js file, you may note that the default setting for
HM_ImageDir looks a little cryptic:
if(typeof(window.HM_ImageDir)=="undefined")
HM_ImageDir = "";
Though admittedly verbose, setting the parameter in this manner (with the if...
logic on the line just prior to the setting of the actual parameter) allows you
to override this setting on a page by page basis if you should choose to do so at
a later time. i.e., The logic above basically says "if HM_ImageDir is not
already set, set it now." If you know that you will never be overridding HM_ImageDir
on any of your pages, then you can remove the if... line that precedes the
HM_ImageDir setting. We recommend, however, that you leave it as is so that
you can take advantage of the feature at a later time if need be.
HM_ImageDir is provided purely for consistency and provides the same feature
as the standard ImageDir configuration parameter. (In fact, the value set
in HM_ImageDir becomes the default value for ImageDir if one is
not provided in the configuration file). Refer, therefore, to the reference entry
for ImageDir for detailed information pertaining to the use of
HM_ImageDir.
- Examples:
// Ok:
HM_ImageDir = "http://mydomain.com/hm/images/",
HM_ImageDir = "/hm/images/", // Web server root relative address
HM_ImageDir = "myimages/", // relative to page (not recommended)
HM_ImageDir = "", // same as page (not recommended)
HM_ImageDir = (window.scheme1)?"/hm/images1/":"/hm/images2/",
// if the user defined variable "scheme1" is true,
// then use the images located in "/hm/images1/";
// otherwise use the images located in "/hm/images2/"
// Incorrect:
HM_ImageDir = http://mydomain.com/hm/images/,
// strings must be quoted
HM_ImageDir = " ",
// no spaces allowed in the empty string
HM_ImageDir : "http://mydomain.com/hm/images/",
// must use = sign (not colon)
HM_ImageDir = '(window.scheme1)?"/hm/images1/":"/hm/images2/"',
// no quoted expressions
- Default:
- ""
- See Also:
-
ImageDir,
HM_ScriptDir,
HM_ConfigFiles,
HM_ConfigType,
HM_FramesEnabled,
HM_ConfigDir
|
|