spacer

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


home / experts / dhtml / column49

Developer News
Metasploit 3.2 Offers More 'Evil Deeds'
'Thank You Apple. Seriously.'
The Buzz: BlackBerry App Store Seen Next
Logo

Hiermenus Go Forth, XIII:
Version 4.0.6 - The Complete Script (Full-Window)



General Improvements

  1. As outlined in our previous column, the menu-creation speed in NS4 depends not on the number of layers created, but on the number of layers written-to with text content. In Version 4.0.5 we minimized the number of layers that NS4 needs to write to, by omitting redundant layers and introducing a new author-defined parameter, HM_NSFontOver.

    In Version 4.0.6, the NS4 code will create the "item mouseover" layer if HM_NSFontOver is true, but not write to it until the user actually needs it, that is, when the user mouses over the item. Therefore, if HM_NSFontOver is true, the menu-creation time can be reduced significantly, by about 40%. If HM_NSFontOver is false, the layers are not created anyway, so there is no change.

    Therefore, with version 4.0.6, authors can improve NS4 initial menu-creation speed (during page load) in the following ways:


    What to do How to do it Result

    Create only the top-level menus.

    HM_PG_CreateTopOnly = true; (for single page only)
    HM_GL_CreateTopOnly = true; (for all pages)

    You may also set the parameter only for NS4:
    HM_PG_CreateTopOnly = document.layers ? true : false; (for single page only)
    HM_GL_CreateTopOnly = HM_NS4 ? true : false; (for all pages)

    All child menus in a menu tree will be created only if needed. That is, if the user mouses over a top-level menu item with a child menu.

    Omit the font color change from the mouseover behavior.

    HM_PG_NSFontOver = false; (for single page only)
    HM_GL_NSFontOver = false; (for all pages)

    Since font color change requires an additional layer and consequent hard-disk access when the layer is written to, omitting the font color change results in one less layer per menu item.

    Write to the mouseover layer only if necessary.

    HM_PG_NSFontOver = true; (for single page only)
    HM_GL_NSFontOver = true; (for all pages)

    or

    omit the HM_xx_NSFontOver parameters, forcing the default value of true.

    The font color change in the mouseover behavior is maintained, but the requisite layer is not written to until the user mouses over the item. Therefore, the complete mouseover behavior is available to NS4 users, without additional initial menu-creation time.


  2. In all browsers, authors had to manually resolve page onload handler conflicts. That is, if the <BODY onLoad> handler exists or if a script other than HM sets an onload handler for the window, authors would have to combine the handler with the HM onload handler. A suggested method was published in the FAQ, as FAQ #3.

    There have been many requests for a transparent handler-handling by HM, so 4.0.6 now checks for a previously defined onload event handler, and executes it after the menus are created.

    Note:
    HM checks for a previously defined onload event handler during page load, so if you need this feature, the menu <SCRIPT> must be included at the end of your page, or at least after all other scripts have been defined and after the BODY tag.

 

Problems reported with 4.0.5 and fixed in 4.0.6

In all browsers, if the link text included the word "javascript" in the path or filename, for example, "http://www.javascript.com/", HM would consider it to be a JavaScript expression and attempt to execute it, causing an error.

The error was caused by this line in HM_f_LinkIt():
if (this.linkText.indexOf("javascript")!=-1) eval(this.linkText)

It should read:

if (this.linkText.indexOf("javascript:")!=-1) eval(this.linkText)

If you are a regular reader of these columns, you should be having a deja vu about now. Yes, this exact same problem was fixed in Version 3.07 twenty months ago! The elusive colon remained with us until Version 3.10.3, then I seemed to have lost it in Version 4.0. This time, I'm using SuperGlue!
Thanks to Jeff Wilson for pointing this out.

Outstanding Issues

The major outstanding issue involves the correct evaluation of JS statements used in the declaration of parameters. The page-specific and global parameters accept most JS expressions. Some expressions, especially those involving foreign characters or font names are still problematic. We will attempt to include the new algorithm we are working on in the next release.

Again, if you don't know what we're talking about, it means you are not having problems, which is a good thing.



On the next page, the sample page included in the download.


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
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Tripwire Whitepaper: Seven Practical Steps to Mitigate Virtualization Security Risks
Internet.com eBook: The Pros and Cons of Outsourcing
Go Parallel Article: Scalable Parallelism with Intel(R) Threading Building Blocks
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview · Controllers: Programming Application Logic - Part 2 · How to Use JavaScript to Validate Form Data
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Choosing the Right Online Backup Provider · Mother Avaya Nurtures Her Technology Partners · Software as a Service a Winning Model for Hotspot Provider

All Rights Reserved. Legal Notices.
Created: Mar 22, 2001
Revised: Mar 22, 2001

URL: http://www.webreference.com/dhtml/column49/2.html