DHTML Lab: Cross-Browser Hierarchical Menus; The Complete Code 2/3 | WebReference

DHTML Lab: Cross-Browser Hierarchical Menus; The Complete Code 2/3


Logo

  Cross-Browser Hierarchical Menus
  SPECIAL EDITION; the director's cut 2/3

The JavaScript Arrays (hierArrays.js)

Listed below are the arrays used on this column's front page, which has the more complex menu trees. Modify these arrays for your own pages. This file, along with the external routine file, may be download in ZIP format.

arMenu1 = new Array(
"Experts","https://www.webreference.com/experts/",1,
"Contents","https://www.webreference.com/index2.html",1,
"Services","https://www.webreference.com/index2.html",1,
"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_2 = new Array(
"Features","https://www.webreference.com/articles.html",0,
"Forum","https://www.webreference.com/cgi-bin/Ultimate.cgi?action=intro",0,
"How-to","https://www.webreference.com/dev/",0,
"New","https://www.webreference.com/headlines/",0,
"Hot Sites","https://www.webreference.com/hot/",0
)
arMenu1_3 = new Array(
"Bookstore","https://www.webdeveloper.com/categories/html/html_reviews_book_news.html",0,
"Domains","https://www.webreference.com/services/dns/",0,
"Graphics","https://www.webreference.com/services/gw/",0,
"Jobs","https://www.webreference.com/jobs/",0,
"Reference","https://www.webreference.com/services/reference/",0,
"ROADMAP","https://www.webreference.com/roadmap/",0,
"Search","https://www.webreference.com/cgi-bin/search.cgi",0,
"Validation","https://www.webreference.com/services/validation/",0,
"Cool Sites","https://www.coolcentral.com",0
)
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(
"About Newsletter","https://www.webreference.com/new/about.html",0,
"Past Issues","https://www.webreference.com/new/archive.html",1
)
arMenu2_2 = new Array(
"Jan 23 1998","https://www.webreference.com/new/980123.html",0,
"Jan 16 1998","https://www.webreference.com/new/980116.html",0,
"Jan 09 1998","https://www.webreference.com/new/980109.html",0,
"Dec 19 1997","https://www.webreference.com/new/971219.html",0,
"Dec 13 1997","https://www.webreference.com/new/971213.html",0
)
arMenu3 = new Array(
"InternetNews.com","https://www.webreference.com/headlines/inews/",0,
"WebDeveloper.com News","https://www.webreference.com/headlines/netnews/",0,
"Internet Wire","https://www.webreference.com/headlines/iwire/",0,
"Inter@ctive Week","https://www.webreference.com/headlines/intweek/",0,
"Serverwatch","https://www.webreference.com/headlines/server/",0,
"ZDNet","https://www.webreference.com/headlines/zdnet/",0,
"Browserwatch","https://browserwatch.internet.com/news/news-current.html",0
)
arMenu4 = new Array(
"Web/Net","",1,
"WebMaster","",1,
"On-Site Originals","",1,
"About Us","",1
)
arMenu4_1 = new Array(
"Books","https://www.webreference.com/books/",0,
"Browsers","https://www.webreference.com/browsers/",0,
"History","https://www.webreference.com/history.html",0,
"Magazines","https://www.webreference.com/magazines/",0,
"Software","https://www.webreference.com/software.html",0,
"Standards","https://www.webreference.com/standards.html",0,
"Statistics","https://www.webreference.com/statistics.html",0,
"Tutorials","https://www.webreference.com/tutorials.html",0
)
arMenu4_2 = new Array(
"Advertising","https://www.webreference.com/advertising/",0,
"Agents & Robots","https://www.webreference.com/agents.html",0,
"Design","https://www.webreference.com/design/",0,
"E-commerce","https://www.webreference.com/ecommerce/",0,
"Graphics","https://www.webreference.com/graphics/",0,
"HTML","https://www.webreference.com/html/",0,
"Imagemaps","https://www.webreference.com/imagemaps.html",0,
"Intranet","https://www.webreference.com/intranet/",0,
"Programming","https://www.webreference.com/programming/",0,
"VRML","https://www.webreference.com/vrml/",0
)
arMenu4_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
)
arMenu4_4 = new Array(
"Athenia Associates","https://www.webreference.com/athenia.html",0,
"Awards","https://www.webreference.com/awards.html",0,
"New Features","https://www.webreference.com/features.html",0,
"In the News","https://www.webreference.com/inthenews.html",0,
"Lore","https://www.webreference.com/lore.html",0,
"Sponsoring","https://www.webreference.com/advertising.html",0,
"Suggest","https://www.webreference.com/contact.php",0
)

Finally, let's look at the cross-browser routines:


Produced by Peter Belesis and

All Rights Reserved. Legal Notices.
Created: Feb. 27, 1998
Revised: Feb. 27, 1998

URL: https://www.webreference.com/dhtml/column15/allCode2.html