|
home / documentation / reference / createonload
CreateOnLoad
- Description:
- Boolean value indicating whether or not the menu should be created just
after the HTML page loads, or when the menu is first called for (its first
display).
- Value:
- Boolean (true or false), Integer (1=true,
0=false), or JavaScript expression that returns a boolean value.
- Applies To:
- Menus.
- Browser Compatibility:
- CreateOnLoad is supported in all browsers.
- Comments:
- When CreateOnLoad is set to true, the menu will be
created just after the HTML page finishes loading. If false, menu creation
is delayed until the first display of the menu on the page. CreateOnLoad
can therefore be used to speed the initial availability of the Web page itself:
when CreateOnLoad is set to false for all menus, then no menus are
created immediately on page load.
In all cases, for stability and consistency reasons HierMenus will not create
menus until after the HTML page finishes loading (see FAQ #10).
CreateOnLoad indicates whether the menu should be created immediately
after page load (true), or when the menu is first called for.
If a menu is marked permanently visible (IsPermanent) and
CreateOnLoad is false, the menu will never be displayed. You can override
HierMenus' default menu loading scheme with MenusToBuild, but this is
not recommended. Usually it is better to specify CreateOnLoad according
to your wishes individually for your menus.
Like all the standard configuration parameters (the special HM_nnn variables,
which are typically set in HM_Loader.js, excluded), CreateOnLoad
can be assigned individually on a menu by menu basis. Therefore the HierMenus 4/5
parameters CreateTopOnly and CreateChildrenJIT are superseded by
CreateOnLoad.
- Examples:
// Ok:
CreateOnLoad:true,
CreateOnLoad:0,
CreateOnLoad:(window.thisPage=="cf")?1:0,
// if the user defined variable "thisPage" is "cf",
// CreateOnLoad is true
// Incorrect:
CreateOnLoad:"false", // quotes not allowed around booleans
CreateOnLoad:"0",
CreateOnLoad:'(window.thisPage=="cf")?1:0', // no quoted expressions
- Default:
- true
- See Also:
-
MenusToBuild
|