Hierarchical Menus in Frames the menu arrays
The structure of the arrays, and the logic it follows, is discussed in great detail in our first menu column.
Reproduced below are the arrays used in the working examples on this page. Open the menus and compare their content to the array elements.
For more complex hierarchical menu arrays, please refer to the listings in column 14 and column 15.
Remember: The final array element is not followed by a comma!
arMenu1 = new Array(
"Experts","https://www.webreference.com/experts/",1,
"Contents","https://www.webreference.com/index2.html",0,
"Services","https://www.webreference.com/index2.html",0,
"About","https://www.webreference.com/about.html",0
)
arMenu1_1 = new Array(
"3-D Animation","https://www.webreference.com/3d/",1,
"Design","https://www.webreference.com/dlab/",1,
"DHTML","https://www.webreference.com/dhtml/",1,
"Internet","https://www.webreference.com/outlook/",1,
"JavaScript","https://www.webreference.com/js/",1
)
arMenu1_1_1 = new Array(
"Lessons","https://www.webreference.com/3d/",0,
"Glossary","https://www.webreference.com/3d/glossary/",0
)
arMenu1_1_2 = new Array(
"Articles","https://www.webreference.com/dlab/",0,
"HTML Unleashed","https://www.webreference.com/dlab/books/",0,
"Dessert Links","https://www.webreference.com/dlab/dessert.html",0,
"About","https://www.webreference.com/dlab/about.html",0,
"People Say","https://www.webreference.com/dlab/peoplesay.html",0
)
arMenu1_1_3 = new Array(
"Columns","https://www.webreference.com/dhtml/",0,
"Links","https://www.webreference.com/dhtml/links.html",0,
"About","https://www.webreference.com/dhtml/about.html",0
)
arMenu1_1_4 = new Array(
"Columns","https://www.webreference.com/outlook/",0,
"License Plate Gallery","https://www.webreference.com/outlook/license/",0
)
arMenu1_1_5 = new Array(
"Columns","https://www.webreference.com/js/",0,
"JxPharmacy","https://www.webreference.com/js/pharmacy/",0,
"Doctor What?","https://www.webreference.com/js/about.html",0
)
arMenu2 = new Array(
"Web/Net","",0,
"WebMaster","",0,
"On-Site Originals","",1,
"About Us","",0
)
arMenu2_3 = new Array(
"Cool Central","https://www.coolcentral.com",0,
"Developer's Corner","https://www.webreference.com/dev/",0,
"Expert Columnists","https://www.webreference.com/experts/",0,
"Feature Articles","https://www.webreference.com/articles.html",0,
"Freebies","https://www.webreference.com/freebies.html",0,
"Services","https://www.webreference.com/services/",0,
"Web Headlines","https://www.webreference.com/headlines/",0,
"What's New?","https://www.webreference.com/new/",0
)
Now, for some more new stuff in the main external script.
|