Hiermenus Go Forth, III - DHTML Lab | 5
Hiermenus Go Forth, III:
Version 4 - The External Arrays - Menu and Item Parameters
Element 3 - item_is_rollover
- Description
- Causes the item to change font and/or background colors upon user mouseover.
- Value
- Boolean
May be specified as:- true Boolean (true / false)
- integer Boolean (1 / 0)
- string JS expression to be evaluated
- Example Values
- true Boolean: true
- The item has rollover behavior.
- The item does not have rollover behavior.
integer Boolean: 1- The item has rollover behavior.
- The item does not have rollover behavior.
JS expression (function call): "getRolloverBehavior()"- A custom function that you have created is called. The return value of this function will be assigned to the item_is_rollover parameter.
- The item will have rollover behavior only if Explorer is being used.
The menu to the left has an item (the third one) excluded from rollover behavior. The menu array looks like this:
HM_Array5 = [ [...], ["Doc JavaScript","https://www.webref.com/js/",1,...], ["HTML with Style","https://www.webref.com/html/",1,...], ["DHTML Lab",,0,...], ["Xploring XML","https://www.webref.com/xml/",1,...], ["3-D Anim Workshop","https://www.webref.com/xml/",1,...] ]
The menu to the left has an item (the third one) excluded from rollover behavior. The item display text contains HTML to create emphasis. The menu array looks like this:
HM_Array6 = [ [...], ["Doc JavaScript","https://www.webref.com/js/",1,...], ["HTML with Style","https://www.webref.com/html/",1,...], ["<B>DHTML Lab</B>",,0,...], ["Xploring XML","https://www.webref.com/xml/",1,...], ["3-D Anim Workshop","https://www.webref.com/xml/",1,...] ]
The menu to the left has an item (the third one) excluded from rollover behavior. All items have child menus. The child menus each contain only one item, which has no rollover behavior. We have created descriptive pop-ups. The menu arrays looks like this:
HM_Array7 = [ [...], ["Doc JavaScript","https://www.webref.com/js/",1,0,1], ["HTML with Style","https://www.webref.com/html/",1,0,1], ["DHTML Lab",,0,0,1], ["Xploring XML","https://www.webref.com/xml/",1,0,1], ["3-D Anim Workshop","https://www.webref.com/xml/",1,0,1] ] HM_Array7_1 = [ [], ["Everything you always wanted to know about JavaScript by our resident experts, Yehuda and Tomer Shiran",,0,0,0] ] HM_Array7_2 = [ [], ["Everything you always wanted to know about HTML and CSS by our resident expert, Stephanos Piperoglou",,0,0,0] ] HM_Array7_3 = [ [], ["Everything you always wanted to know about DHTML by our resident expert, Me",,0,0,0] ] HM_Array7_4 = [ [], ["Everything you always wanted to know about XML by our resident expert, Michael Classen",,0,0,0] ] HM_Array7_5 = [ [], ["Everything you always wanted to know about 3-D Animation by our resident expert, Robert Polevoi",,0,0,0] ]
The text link, above, causes a top-level menu to appear upon mouseover. The menu has only one item without rollover. We have created a pop-up tool-tip! The menu arrays looks like this:
HM_Array8 = [ [...], ["Everything you always wanted to know about DHTML by our resident expert, Me",,0,0,0] ]
- Default
- true.
If omitted, the item will change font and/or background color upon mouseover. - Differences from Version 3 equivalent
- There is no Version 3 equivalent. All items had rollover behavior.
- Comments
- This parameter is especially useful when you have an item that you want to exclude from the rollover, possibly because it usually links to the page the user is on, and in creating tooltips or description pop-ups, as in the examples above. Combine it with item_permanently_highlighted, discussed on the next page, to create menu headings.
On the next page, we'll discover how to keep an item in a permanent rollover state.
Produced by Peter Belesis and
All Rights Reserved. Legal Notices.Created: Oct 03, 2000
Revised: Oct 03, 2000
URL: https://www.webreference.com/dhtml/column38/5.html