spacer
Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / dhtml / column38
Developer News
Eclipse Helios Update Brings New PHP Tools
Internet Explorer 9 Ups Standards Support
JBoss Portal 5 Release Easier to Use

Logo

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


As published in Column 35, here is a comparison of the old Version 3 and new Version 4 child menu array structures:

Version 3Version 4
arMenu1_1 = new Array(

    item_display_text,
    item_link_url,
    item_has_child,

    item_display_text,
    item_link_url,
    item_has_child,

    ...
)
HM_Array1_1 = [

[],

[item_display_text,
 item_link_url,
 item_is_rollover,
 item_permanently_highlighted,
 item_has_child],

[item_display_text,
 item_link_url, 
 item_is_rollover,
 item_permanently_highlighted,
 item_has_child],

 ...
]

Real-world child-menu arrays with valid values look like this:

Version 3Version 4
arMenu1_1 = new Array(

"3-D","http://www.webref.com/3d/",0,
"Design","http://www.webref.com/dlab/",0,
"DHTML","http://www.webref.com/dhtml/",1,
"JavaScript","http://www.webref.com/js/",0

)
HM_Array1_1 = [
[],

["3-D","http://www.webref.com/3d/",1,0,0],
["Design","http://www.webref.com/dlab/",1,0,0],
["DHTML","http://www.webref.com/dhtml/",1,0,1],
["JavaScript","http://www.webref.com/js/",1,0,0]

]

As in the top-level menu arrays, all elements of child-menu arrays are themselves arrays. The first element is an empty array ([]). It is reserved for menu-specific parameters that we may add in future versions. These parameters will affect only the menu defined by the array. Presently, there are no such parameters. In the future, they may include parameters to define a particular width or color scheme on a menu-by-menu basis, for example.

It is too early in the development of Version 4 to include such specific parameters. What will be included will be based on your feedback after Version 4.0 is released.

For now, all child-menu arrays will have an empty array as a first element, and menu look will be defined on a global or tree level only.

Version 4 does, however, introduce powerful item-specific parameters.

Produced by Peter Belesis and

webref The latest from WebReference.com Browse >
Flashmaps' DynamicLocator: Interactive Maps for Small Areas · Flashmaps' AreaSelector: Interactive Maps for Wide Areas · The DB Mapper: Interactive Street-level Maps of U.S. and Canada
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
MS Access and MySQL · Cisco AutoQoS: VoIP QoS for Mere Mortals · While VoIP Adoption Explodes in Enterprise, Carrier Spending Lags

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

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