DHTML Lab: Hierarchical Menus, I; The Complete Code 2/3 | WebReference

DHTML Lab: Hierarchical Menus, I; The Complete Code 2/3


Logo

  DHTML Hierarchical Menus, Part I
  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","http://www.webreference.com/experts/",1,
"Contents","http://www.webreference.com/index2.html",1,
"Services","http://www.webreference.com/index2.html",1,
"About","http://www.webreference.com/about.html",0
)
arMenu1_1 = new Array(
"3-D Animation","http://www.webreference.com/3d/",1,
"Design","http://www.webreference.com/dlab/",1,
"DHTML","http://www.webreference.com/dhtml/",1,
"Internet","http://www.webreference.com/outlook/",1,
"JavaScript","http://www.webreference.com/js/",1
)
arMenu1_2 = new Array(
"Features","http://www.webreference.com/articles.html",0,
"Forum","http://www.webreference.com/cgi-bin/Ultimate.cgi?action=intro",0,
"How-to","http://www.webreference.com/dev/",0,
"New","http://www.webreference.com/headlines/",0,
"Hot Sites","http://www.webreference.com/hot/",0
)
arMenu1_3 = new Array(
"Bookstore","http://www.webdeveloper.com/categories/html/html_reviews_book_news.html",0,
"Domains","http://www.webreference.com/services/dns/",0,
"Graphics","http://www.webreference.com/services/gw/",0,
"Jobs","http://www.webreference.com/jobs/",0,
"Reference","http://www.webreference.com/services/reference/",0,
"ROADMAP","http://www.webreference.com/roadmap/",0,
"Search","http://www.webreference.com/cgi-bin/search.cgi",0,
"Validation","http://www.webreference.com/services/validation/",0,
"Cool Sites","http://www.coolcentral.com",0
)
arMenu1_1_1 = new Array(
"Lessons","http://www.webreference.com/3d/",0,
"Glossary","http://www.webreference.com/3d/glossary/",0
)
arMenu1_1_2 = new Array(
"Articles","http://www.webreference.com/dlab/",0,
"HTML Unleashed","http://www.webreference.com/dlab/books/",0,
"Dessert Links","http://www.webreference.com/dlab/dessert.html",0,
"About","http://www.webreference.com/dlab/about.html",0,
"People Say","http://www.webreference.com/dlab/peoplesay.html",0
)
arMenu1_1_3 = new Array(
"Columns","http://www.webreference.com/dhtml/",0,
"Links","http://www.webreference.com/dhtml/links.html",0,
"About","http://www.webreference.com/dhtml/about.html",0
)
arMenu1_1_4 = new Array(
"Columns","http://www.webreference.com/outlook/",0,
"License Plate Gallery","http://www.webreference.com/outlook/license/",0
)
arMenu1_1_5 = new Array(
"Columns","http://www.webreference.com/js/",0,
"JxPharmacy","http://www.webreference.com/js/pharmacy/",0,
"Doctor What?","http://www.webreference.com/js/about.html",0
)
arMenu2 = new Array(
"About Newsletter","http://www.webreference.com/new/about.html",0,
"Past Issues","http://www.webreference.com/new/archive.html",1
)
arMenu2_2 = new Array(
"Jan 23 1998","http://www.webreference.com/new/980123.html",0,
"Jan 16 1998","http://www.webreference.com/new/980116.html",0,
"Jan 09 1998","http://www.webreference.com/new/980109.html",0,
"Dec 19 1997","http://www.webreference.com/new/971219.html",0,
"Dec 13 1997","http://www.webreference.com/new/971213.html",0
)
arMenu3 = new Array(
"InternetNews.com","http://www.webreference.com/headlines/inews/",0,
"WebDeveloper.com News","http://www.webreference.com/headlines/netnews/",0,
"Internet Wire","http://www.webreference.com/headlines/iwire/",0,
"Inter@ctive Week","http://www.webreference.com/headlines/intweek/",0,
"Serverwatch","http://www.webreference.com/headlines/server/",0,
"ZDNet","http://www.webreference.com/headlines/zdnet/",0,
"Browserwatch","http://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","http://www.webreference.com/books/",0,
"Browsers","http://www.webreference.com/browsers/",0,
"History","http://www.webreference.com/history.html",0,
"Magazines","http://www.webreference.com/magazines/",0,
"Software","http://www.webreference.com/software.html",0,
"Standards","http://www.webreference.com/standards.html",0,
"Statistics","http://www.webreference.com/statistics.html",0,
"Tutorials","http://www.webreference.com/tutorials.html",0
)
arMenu4_2 = new Array(
"Advertising","http://www.webreference.com/advertising/",0,
"Agents & Robots","http://www.webreference.com/agents.html",0,
"Design","http://www.webreference.com/design/",0,
"E-commerce","http://www.webreference.com/ecommerce/",0,
"Graphics","http://www.webreference.com/graphics/",0,
"HTML","http://www.webreference.com/html/",0,
"Imagemaps","http://www.webreference.com/imagemaps.html",0,
"Intranet","http://www.webreference.com/intranet/",0,
"Programming","http://www.webreference.com/programming/",0,
"VRML","http://www.webreference.com/vrml/",0
)
arMenu4_3 = new Array(
"Cool Central","http://www.coolcentral.com",0,
"Developer's Corner","http://www.webreference.com/dev/",0,
"Expert Columnists","http://www.webreference.com/experts/",0,
"Feature Articles","http://www.webreference.com/articles.html",0,
"Freebies","http://www.webreference.com/freebies.html",0,
"Services","http://www.webreference.com/services/",0,
"Web Headlines","http://www.webreference.com/headlines/",0,
"What's New?","http://www.webreference.com/new/",0
)
arMenu4_4 = new Array(
"Athenia Associates","http://www.webreference.com/athenia.html",0,
"Awards","http://www.webreference.com/awards.html",0,
"New Features","http://www.webreference.com/features.html",0,
"In the News","http://www.webreference.com/inthenews.html",0,
"Lore","http://www.webreference.com/lore.html",0,
"Sponsoring","http://www.webreference.com/advertising.html",0,
"Suggest","http://www.webreference.com/contact.php",0
)

Finally, let's look at the routines that will make our sites easier to navigate:


Produced by Peter Belesis and

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

URL: http://www.webreference.com/dhtml/column14/allCode2.html