Please Note:
HierMenus is protected by copyright laws. Use of the HierMenus code requires a paid licensing agreement.
Click Here to Register

Site Navigation
Bulletins
About
Documentation
FAQ
Samples
Known Issues
Technology Jobs

internet.commerce

Partner With Us














          
internet.com

IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

 
HierMenusCentral Enhance the Functionality of Your Web Site with DHTML HierMenus.
    

home / documentation / reference / menustobuild

MenusToBuild

Description:
An array of menu IDs to create immediately when the page loads.

Value:
JavaScript array reference, or JavaScript expression that returns a JavaScript array reference.

Applies To:
Globally.

Browser Compatibility:
MenusToBuild is supported in all browsers.

Comments:
By default, HierMenus decides which menus to create when the page loads based on their individual CreateOnLoad settings. MenusToBuild allows you to override that behavior. When MenusToBuild is set, HierMenus will build only those menus with IDs in the MenusToBuild array. In other words, HierMenus assumes all the menus in the MenusToBuild array have CreateOnLoad set to true, while all other menus on the page have CreateOnLoad set to false.

MenusToBuild is provided purely for backwards support with the HierMenus version 4/5 HM_a_TreesToBuild array. Since CreateOnLoad can now be assigned on a menu by menu basis, it has little to no use beginning in HierMenus version 6.

The easiest way to set MenusToBuild is to use array literals; i.e., to force HM to build only the menus with IDs "hm_1", "hm_3", and "hm_6" on page load (regardless of HM parameter settings or other menus defined in the configuration file):

MenusToBuild:["hm_1","hm_3","hm_6"],
Note that assigning a single menu entry via this method can be problematic in Netscape 4.x, however; therefore, when only one menu is to be set in MenusToBuild we recommend this alternate lingo:
HM_a_TreesToBuild = [];
HM_a_TreesToBuild[0]="hm_3";
....
// now in HM_f_UpdateDefaults or in the HM_o_PageDefaults object
MenusToBuild:HM_a_TreesToBuild,
MenusToBuild will be most commonly used as a page-specific default, since applying it as a global default is no different than assigning CreateOnLoad to the individual menus you wish to build. See the setup instructions for further details on page specific variables.

MenusToBuild will only work properly when it is set as a default, i.e., via the HM_o_PageDefaults object or HM_f_UpdateDefaults. Applying MenusToBuild to a menu template, menu, or menu item will have no effect.

Examples:
// Ok:
MenusToBuild:["hm_products","hm_services"],
MenusToBuild:[],
MenusToBuild:(window.prodPage)?["hm_products"]:[],
    // if the user defined variable "prodPage" is true,
    // then build only hm_products

// Incorrect:
MenusToBuild:'["hm_products","hm_services"]',
    // do not quote array literals
MenusToBuild:'(window.prodPage)?["hm_products"]:[]', 
    // no quoted expressions
Default:
[]

See Also:
CreateOnLoad



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
Intel PDF: Virtualization Delivers Data Center Efficiency
Intel eBook: Managing the Evolving Data Center
Microsoft Article: BitLocker Brings Encryption to Windows Server 2008
Symantec eBook: The Guide to E-Mail Archiving and Management
Microsoft Article: RODCs Transform Branch Office Security
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
Avaya Article: Advancing the State of the Art in Customer Service
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Avaya Article: Avaya AE Services Provide Rapid Telephony Integration with Facebook
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Seminar: Efficiencies in Hardware/Software Virtualization
HP Webcast: Disaster Recovery Planning
Go Parallel Video: Performance and Threading Tools for Game Developers
HP Video: StorageWorks EVA4400 and Oracle
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
IBM TCO eKIT: Your IT Budget is Under Attack, Get in Control
IBM Energy Efficiency eKIT: Learn How to Reduce Costs
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
Microsoft Article: Silverlight Streaming--Free Video Hosting for All
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
HP Demo: StorageWorks EVA4400
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
Created: 3/25/2004
Updated: 3/25/2004
URL: http://www.hiermenuscentral.com/documentation/reference/menustobuild.html