 |
|
We are currently working on providing HierMenus to you at no cost. HierMenus code requires a confirmed membership with internet.com. Please register by clicking here and come back soon to download your free copy of HeirMenus code.
|
|
 |

|
 |
 |
|
home / documentation / reference / childmenux
ChildMenuX
- Description:
- The horizontal (left) pixel position of the menu when
the menu is being displayed as a child level menu.
- Value:
- Integer, null, JavaScript expression that
returns an integer, or String JavaScript expression that returns
an integer.
- Applies To:
- Menus.
- Browser Compatibility:
- ChildMenuX is supported in all browsers.
- Comments:
- Note that this parameter defines the menu's left pixel position
(in relationship to the HTML document) when the menu is being displayed as
a child level menu. Compare this parameter to TopMenuX,
which defines the menu's left pixel position when the menu is used as a
top menu. A single menu can be used as both a top level
menu and a child menu on the same page. This Child vs. Top
distinction allows you to define different settings depending on how
the menu is currently being utilized.
When using a String JavaScript expression (i.e., a JavaScript expression
contained within quotes), that expression will not be evaluated until
just before the menu is positioned. It will then be reevaluated every time
the menu is repositioned or redisplayed. Thus, a string JavaScript expression
can be crafted to return a different, custom result dynamically each time
the menu is positioned. Other JavaScript expressions (not enclosed in quotes)
are only evaluated once when the page is first loaded.
Special keywords can be utilized in String JavaScript expressions that allow
you to fine tune the positional display of the menus, including
HM_default_x_position, HM_default_y_position, HM_window_top_edge,
HM_window_right_edge, HM_window_bottom_edge, and HM_window_left_edge.
In addition to these keywords, HierMenus version 6 provides two custom functions
in the HM_Loader.js file; HM_f_GetMenuDimension and
HM_f_GetElementXY that allow you to position menus based on their
width or height (handy for bottom or right edge based positioning) or the
location of some other element within the page (handy for relative positioning).
Each of these uses is discussed further in the mini-tutorial
Menu Positioning.
The integer provided (or returned from a JavaScript expression) is always
interpreted as the left pixel location of the menu. You must provide only
an integer or an expression that returns an integer.
- Examples:
// Ok:
ChildMenuX:100,
ChildMenuX:null, // revert to default
ChildMenuX:"HM_default_x_position+10", // reevaluated as needed
ChildMenuX:"MyCustomFunction('foobar')", // call your own function
ChildMenuX:(HM_IE)?10:20, // evaluated only once on page load
// Incorrect:
ChildMenuX:"100",
ChildMenuX:HM_default_x_position+10, // must have quotes to use keywords
ChildMenuX:20px,
- Default:
- null
Note that setting ChildMenuX to null is equivalent to setting
it to "HM_default_x_position"; i.e., the following two settings
result in the same value:
ChildMenuX:null,
ChildMenuX:"HM_default_x_position",
- See Also:
-
TopMenuX,
TopMenuY,
ChildMenuY,
Menu Positioning Mini-Tutorial
|
|