Hiermenus Go Forth, IV - DHTML Lab | 5 | WebReference

Hiermenus Go Forth, IV - DHTML Lab | 5

Logo

Hiermenus Go Forth, IV:
Version 4 - The Page-Specific Parameters



HM_PG_ItemPadding

Description
Sets the padding (distance from item border to item text) of all menu items in the page. All menus, in all cascades (top-level and children) are affected.

HM_PG_ItemPadding overrides site-wide global settings declared in the external script.

Value
Pixels.
May be specified as:
  • integer
  • string
  • string JS expression to be evaluated

Example Values
integer: 3
    All menu items in the page will have 3 pixel padding.

string: "3"
    All menu items in the page will have 3 pixel padding.

JS expression: "getPadding()"
    A custom function that you have created will be called. The return value of this function will be the HM_PG_ItemPadding parameter, and all menus in the page will comply.

JS expression: "eval(HM_PG_FontSize) > 12 ? 6 : 3"
    The complete JS code is included in the parameter declaration. In the above example, HM_PG_ItemPadding is 6 if HM_PG_FontSize is 12 or greater. If not, HM_PG_ItemPadding is 3. Notice that one parameter's value can be determined by another's. Also note that we evaluate the value of HM_PG_FontSize since it may be declared as an integer, string or JS expression.

Default
If this parameter is omitted the relevant Global Parameter value, set in the external script is used.

Differences from Version 3 equivalent
The itemPad parameter in Version 3:
  • accepted only integer values.
  • was mandatory.

In our next installment, Hiermenus Go Forth, V, we'll continue our look at the new Page-Specific Parameters.


Produced by Peter Belesis and

All Rights Reserved. Legal Notices.
Created: Nov 22, 2000
Revised: Nov 22, 2000

URL: https://www.webreference.com/dhtml/column40/13.html