Hiermenus Go Forth, III - DHTML Lab | 2
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 3 | Version 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 3 | Version 4 |
---|---|
arMenu1_1 = new Array( "3-D","https://www.webref.com/3d/",0, "Design","https://www.webref.com/dlab/",0, "DHTML","https://www.webref.com/dhtml/",1, "JavaScript","https://www.webref.com/js/",0 ) |
HM_Array1_1 = [ [], ["3-D","https://www.webref.com/3d/",1,0,0], ["Design","https://www.webref.com/dlab/",1,0,0], ["DHTML","https://www.webref.com/dhtml/",1,0,1], ["JavaScript","https://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
All Rights Reserved. Legal Notices.Created: Oct 03, 2000
Revised: Oct 03, 2000
URL: https://www.webreference.com/dhtml/column38/2.html