Hiermenus Go Forth, XXVI - DHTML Lab | 6 | WebReference

Hiermenus Go Forth, XXVI - DHTML Lab | 6


Logo

Hiermenus Go Forth, XXVI:
Version 4.2 - The Complete Script (Full-Window)



The New Parameters

HM4.2 introduces seven new parameter variables that can be set either as global (HM_GL_xxxxx in HM_Loader.js) or page-specific (HM_PG_xxxxx in your page.)

HM_xx_ScrollEnabled = true;
HM_xx_ScrollBarHeight = 14;
HM_xx_ScrollBarColor = "lightgrey";
HM_xx_ScrollImgSrcTop = "HM_More_black_top.gif";
HM_xx_ScrollImgSrcBot = "HM_More_black_bot.gif";
HM_xx_ScrollImgWidth = 9;
HM_xx_ScrollImgHeight = 5;

HM_xx_ScrollEnabled

This is the most important parameter, naturally. If omitted menus will not be scroll-enabled. Setting it to true will enable the new scrolling functionality.

Use it sparingly, and only if you believe the menus you have created truly warrant scrolling. Otherwise, scroll elements may be created unnecessarily, raising the script overhead. For example a very short menu will sprout scroll elements when a user resizes the browser window to a very small size for whatever reason, if HM_xx_ScrollEnabled is true. This may be unwanted behavior.

HM_xx_ScrollBarHeight

The vertical height of the scroll elements.
The image will automatically be centered, both horizontally and vertically.

HM_xx_ScrollBarColor

Any valid color value can be used for the background. You can, as with all parameters use JS expressions or variables. For example to have the scrollbar the same color as the highlight color of your menu items, you can use the following syntax:

HM_xx_ScrollBarColor = HM_xx_BGColorOver;

HM_xx_ScrollImgSrcTop

The src of the image to display in the top scroll element:

HM_xx_ScrollImgSrcBot

The src of the image to display in the bottom scroll element:

HM_xx_ScrollImgWidth

The width of the image displayed in the scroll elements. This value is used to position the image horizontally:

HM_xx_ScrollImgHeight

The height of the image displayed in the scroll elements. This value is used to position the image vertically:



The HM4.2 download includes several images you can use. A list of these can be found on the next page.


Produced by Peter Belesis and

All Rights Reserved. Legal Notices.
Created: February 04, 2002
Revised: February 04, 2002

URL: https://www.webreference.com/dhtml/column62/3.html