spacer

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

home / experts / dhtml / column35
Biz Resources
Ecommerce Hosting
Dedicated Server Hosting
Data Recovery Services
Developer News
MicrosoftÂ’s Automated Agent: Can We Talk?
Borland Finally Sells CodeGear
Red Hat Heads For The JON 2.0
Logo

Hiermenus Go Forth*, I:
Version 4 - The External Arrays


HierMenus
CENTRAL
IMPORTANT NOTE:
This column begins a multi-column discussion of a new version of the hierarchical menu script.
Until our discussion is complete, the current version of the script will still be the latest maintenance release of Version 3: 3.10.3.
Read this column, and future columns, to learn how we built the menu script.
Use the most recent version of the script, always available in HierMenus Central.


Finally, Version 4 of our popular Hierarchical Menu Script has arrived!

This version is faster, more versatile, feature-rich and future-compatible. If the response to our last version is any indication, the ability to incorporate future reader suggestions is a must.

The Version 4 Columns

As with every major version of HM (see Version 1, Version 1 with frameset use, Version 2, Version 3) our discussion of the script will be complete. This, for better or for worse, means long columns. If you enjoy learning how and why we use every JavaScript statement in the script, you will be grateful. If you prefer to just cut-and-paste routines, well, there will be a short wait.

Instead of attempting to cram everything necessary for a full understanding of the script into one interminable column, we are splitting up our discussion into logical sections. Unlike previous versions, Version 4 is more condusive to fragmented discussion, because there is not one single hierMenus.js external script for all browsers and platforms.

The Cross-Browser Misnomer

As we all know by now, there is no such thing as cross-browser DHTML code. Any code that claims to be cross-browser like, admittedly, the DHTML Lab scripts, are rife with if...else statements, and poor lowest-common-denominator routines. Users end up downloading two or more times the script necessary for their browser and usually get compromised and unoptimized code to execute.

We are not referring only to the Navigator-Explorer differences. There are even more differences between Explorer versions. Microsoft, in reality, has released five DHTML browsers:

  1. IE4.x for Windows
  2. IE4.x for Macintosh (many differences even between 4.0/4.01/4.5 IEMac)
  3. IE5.0, IE5.01 for Windows
  4. IE5.x for Macintosh
  5. IE5.5 for Windows

Only the most rudimentary DHTML renders the same in all these browsers. If we find a lowest-common-denominator, we inevitably ignore IE5+ Windows-only functionality like behaviours or dynamic properties. As authors, we will know that we:

"could have done it a better way, but then it wouldn't have worked on [fill in browser name]"

HM Version 4 is comprised of several external files, each one optimized for a particular browser. Only the optimized file is loaded, giving users only the code necessary for their browser. These files will, of course, be much shorter than the Version 3.x hierMenus.js, providing yet another benefit.

We will, therefore, publish the complete HM script in the following order:

  1. The External Array File - hierArrays.js (this column)
    - review of the function of the menu-building arrays contained in the external file and introduction to the new array structure and elements.

  2. The External Array File - hierArrays.js
    - continuation of the discussion of the new array structure and elements.

  3. The In-page Code
    - all the script and links necessary for inclusion in the web page where the menus will appear, including the Global Parameter Variables.

  1. The External Menu Routines File for Navigator 4.x, all platforms.

  2. The External Menu Routines File for Explorer 4.x, for Windows.
    - these routines will also work in IE5.x for Windows, albeit unoptimized.

  3. The External Menu Routines File for Explorer 5.x, all platforms.

  4. The External Menu Routines File for Explorer 4.x Macintosh
    - this will be the first appearance of the HM for these browsers.

  5. The External Menu Routines File for Gecko (Mozilla/Netscape 6)
    - this will be the first appearance of the HM for these browsers.

These routines will all be for non-frameset full-window pages.

Well over 90% of HM use on the Web today is in non-frameset pages. Version 3 of HM makes many compromises, especially in execution speed and length, because it is a single script for both frameset and full-window pages.

With Version 4, users will load only the code applicable to their environment.

  1. Summary of the complete Full-Window flavor of HM Version 4.

  2. to ?.   Frameset Considerations

So Let's get started.


* with apologies to Blackadder

Produced by Peter Belesis and



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: HyperV-The Killer Feature in WinServer ‘08
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Win Server ‘08
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
Perl Pragma Primer · Implement Drag and Drop in Your Web Apps: Part 2 · How to Create an Ajax Autocomplete Text Field: Part 5
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
SQL Server 2005 Express Edition - Part 22 - Upgrading from Microsoft SQL Server Desktop Engine (MSDE) · Vyatta: Downgrades that Pay Off · NetMotion Brings Cross-Network Support to Wireless VoIP

All Rights Reserved. Legal Notices.
Created: Aug 08, 2000
Revised: Aug 08, 2000

URL: http://www.webreference.com/dhtml/column35/