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

Hiermenus Go Forth, III - DHTML Lab | 6

Logo

Hiermenus Go Forth, III:
Version 4 - The External Arrays - Menu and Item Parameters


Element 4 - item_permanently_highlighted

Description
Causes the item to always display in the mouseover font and background colors. It also has no rollover behavior.
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 no rollover behavior and always displays in the mouseover colors.
true Boolean: false
    The item displays in the idle state colors. Its mouseover behavior is determined by the item_is_rollover parameter.

integer Boolean: 1
    The item has no rollover behavior and always displays in the mouseover colors.
integer Boolean: 0
    The item displays in the idle state colors. Its mouseover behavior is determined by the item_is_rollover parameter.

JS expression (function call): "getItemPermanence()"
    A custom function that you have created is called. The return value of this function will be assigned to the item_permanently_highlighted parameter.
JS expression (complete statement): "location=='6.html'"
    The item will be permanently highlighted if the menu is on Web page is 6.html.

 

The menu to the left has an item (the third one) that is permanently highlighted. The menu array looks like this:

HM_Array9 = [
[...],
["Doc JavaScript","http://www.webref.com/js/",1,0,0],
["HTML with Style","http://www.webref.com/html/",1,0,0],
["DHTML Lab",,0,"location=='6.html'",0],
["Xploring XML","http://www.webref.com/xml/",1,0,0],
["3-D Anim Workshop","http://www.webref.com/xml/",1,0,0],
]

The menu to the left has an item (the first one) that is permanently highlighted, creating a menu heading. The menu array looks like this:

HM_Array10 = [
[...],
["WebRef Experts",,0,1,0],
["Doc JavaScript","http://www.webref.com/js/",1,0,0],
["HTML with Style","http://www.webref.com/html/",1,0,0],
["DHTML Lab","http://www.webref.com/dhtml/",1,0,0],
["Xploring XML","http://www.webref.com/xml/",1,0,0],
["3-D Anim Workshop","http://www.webref.com/3d/",1,0,0]
]

The menu to the left has an item (the first one) that is permanently highlighted, creating a menu heading. All items, except the first, have child menus. The child menus each contain two items. The first one is permanently highlighted and the second has no rollover behavior. We have created descriptive pop-ups with headings! The menu arrays looks like this:


HM_Array11 = [
[...],
["WebRef Experts",,0,1,0],
["Doc JavaScript","http://www.webref.com/js/",1,0,1],
["HTML with Style","http://www.webref.com/html/",1,0,1],
["DHTML Lab","http://www.webref.com/html/",1,0,1],
["Xploring XML","http://www.webref.com/xml/",1,0,1],
["3-D Anim Workshop","http://www.webref.com/3d/",1,0,1]
]
HM_Array11_2 = [
[],
["JavaScript",,0,1,0],
["Everything you always wanted to know about JavaScript by our resident experts, Yehuda and Tomer Shiran",,0,0,0]
]
HM_Array11_3 = [
[],
["HTML/CSS",,0,1,0],
["Everything you always wanted to know about HTML and CSS by our resident expert, Stephanos Piperoglou",,0,0,0]
]
HM_Array11_4 = [
[],
["DHTML",,0,1,0],
["Everything you always wanted to know about DHTML by our resident expert, Me",,0,0,0]
]
HM_Array11_5 = [
[],
["XML",,0,1,0],
["Everything you always wanted to know about XML by our resident expert, Michael Classen",,0,0,0]
]
HM_Array11_6 = [
[],
["3-D Animation",,0,1,0],
["Everything you always wanted to know about 3-D Animation by our resident expert, Robert Polevoi",,0,0,0]
]

The Hierarchical Menu script is an example of DHTML.


The text link, above, causes a top-level menu to appear upon mouseover. The menu has two items. The first one is permanently highlighted and the second has no rollover behavior. We have created pop-up tool-tips with headings! The menu array looks like this:

HM_Array12 = [
[...],
["Dictionary",,0,1,0],
["Dynamic Hypertext Markup Language",,0,0,0]
]

Default
false.
If omitted, the item will originally display in the idle state color scheme then change font and/or background color upon mouseover according to the item_is_rollover value.

Differences from Version 3 equivalent
There is no Version 3 equivalent. All items originally displayed in their idle state and had rollover behavior.

Comments
Use this parameter for items that are menu headings or that identify the page the user is on. Combined with item_is_rollover, it helps create tooltips and description pop-ups, with headings.

On the next page, we'll look at the fifth item parameter.


Produced by Peter Belesis and

All Rights Reserved. Legal Notices.
Created: Oct 03, 2000
Revised: Oct 03, 2000

URL: http://www.webreference.com/dhtml/column38/6.html