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
PDA Phones & Cases
Get Business Software
Promotional Pens
Best Price
Car Donations
Promotional Golf
Find Software
Home Improvement
Phone Cards
Compare Prices
KVM Switches
Cell Phones
Prepaid Phone Card
Shop Online

          
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 / hm_configdir

HM_ConfigDir

Description:
The server directory (folder) where your user-defined HierMenus configuration files are stored.

Value:
String, empty string (""), or JavaScript expression that returns a String/empty string.

Applies To:
Globally.

Browser Compatibility:
HM_ConfigDir is supported in all browsers.

Comments:
HM_ConfigDir is the server directory, specified as a valid URL, of the location on your Web server where your user defined configuration files are stored. This may be the same directory as your scripts and/or images or a different directory altogether per your discretion. We recommend storing your configuration files separately from your scripts and images.

HM_ConfigDir is a global variable that is set in the HM_Loader.js file. It is not set in the configuration file as other configuration parameters are, which explains why it is set using a standard JavaScript assignment statement (via the = sign). The reason for this is because HierMenus needs to know the value of HM_ConfigDir before the configuration files themselves are loaded. See the examples below.

When set to something other than the empty string (""), HM_ConfigDir must always end with a trailing slash (/).

If HM_ConfigDir is set to the empty string, as it is by default, then HierMenus will assume that your configuration files (the names of which are specified in HM_ConfigFiles) exist in the same directory that the HTML page that is calling them is in. This means that, with HM_ConfigDir set to the empty string you would need to place copies of your configuration files in each directory of your server (or at the very least, each directory that contains an HTML page that will be displaying menus). This approach is not advised.

Rather, you should create a a single directory on your server where all your configuration files will be stored, and then set HM_ConfigDir to point to that directory. If you use an absolute (including the domain name) or root-relative (beginning with a slash) pathname in HM_ConfigDir, then HierMenus will be able to properly find the files no matter where the HTML page that loads them is. For example, assuming your domain is called www.mydomain.com and you've stored the configuration files in a folder in your Web document root called hm/configs, then either of these settings for HM_ConfigDir is recommended:

HM_ConfigDir="http://www.mydomain.com/hm/configs/";
HM_ConfigDir="/hm/configs/";
Note how the configuration parameter setting HM_ConfigDir interacts with the HM_ConfigFiles parameter. HM_ConfigFiles is always added to the front of each configuration file specified in HM_ConfigFiles to arrive at the actual server location for each file. For example, given these two settings:
HM_ConfigFiles="config1.js,config2.js";
HM_ConfigDir="http://mydomain.com/hm/configs/";
HierMenus would attempt to retrieve these two files from the server
http://mydomain.com/hm/configs/config1.js
http://mydomain.com/hm/configs/config2.js
In the HM_Loader.js file, you may note that the default setting for HM_ConfigDir looks a little cryptic:
if(typeof(window.HM_ConfigDir)=="undefined")
	HM_ConfigDir = "";
Though admittedly verbose, setting the parameter in this manner (with the if... logic on the line just prior to the setting of the actual parameter) allows you to override this setting on a page by page basis if you should choose to do so at a later time. i.e., The logic above basically says "if HM_ConfigDir is not already set, set it now." If you know that you will never be overridding HM_ConfigDir on any of your pages, then you can remove the if... line that precedes the HM_ConfigDir setting. We recommend, however, that you leave it as is so that you can take advantage of the feature at a later time if need be.

Examples:
// Ok:
HM_ConfigDir = "http://mydomain.com/hm/configs/",
HM_ConfigDir = "/hm/configs/", // Web server root relative address
HM_ConfigDir = "myconfig/",    // relative to page (not recommended)
HM_ConfigDir = "",             // same as page (not recommended)
HM_ConfigDir = (window.useVerbose)?"/hm/confvb/":"/hm/confopt/",
    // if the user defined variable "useVerbose" is true,
    // then use the scripts located in "/hm/confvb/"; 
    // otherwise use the scripts located in "/hm/confopt/"

// Incorrect:
HM_ConfigDir = http://mydomain.com/hm/configs/,
    // strings must be quoted
HM_ConfigDir = " ",
    // no spaces allowed in the empty string
HM_ConfigDir : "http://mydomain.com/hm/configs/",
    // must use = sign (not colon)
HM_ConfigDir = '(window.useVerbose)?"/hm/confvb/":"/hm/confopt/"',
    // no quoted expressions
Default:
""

See Also:
HM_ScriptDir, HM_ConfigFiles, HM_ConfigType, HM_FramesEnabled, HM_ImageDir



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 eBook: Planning a Service Oriented Architecture
IBM eBook: Choosing the Right Architecture--What It Means for You and Your Business
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Avaya Article: Using Intelligent Presence to Create Smarter Business Applications
Intel Go Parallel Article: Getting Started with TBB on Windows
Microsoft Article: 7.0, Microsoft's Lucky Version?
Avaya Article: How to Feed Data into the Avaya Event Processor
IBM Article: Developing a Software Policy for Your Organization
Microsoft Article: Managing Virtual Machines with Microsoft System Center
Intel Go Parallel Article: Intel Threading Tools and OpenMP
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
HP Video: StorageWorks EVA4400 and Oracle
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
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
Silverlight 2 App and Walkthrough: Leverage Silverlight 2 with SQL Server and XML
IBM Article: Enterprise Search--Do You Know What's Out There?
HP Demo: StorageWorks EVA4400
Microsoft Article: The Progress and Promise of Deep Zoom
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
Created: 3/25/2004
Updated: 3/25/2004
URL: http://www.hiermenuscentral.com/documentation/reference/hm_configdir.html