Hiermenus Go Forth, I - DHTML Lab | 8 | WebReference

Hiermenus Go Forth, I - DHTML Lab | 8


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

More Background

Here is a reprint of the detailed array element specifications, taken from the Instructions pages:

The First NINE Elements of a Top-Level Menu Array

The setting of these elements is OPTIONAL. If you provide a null or empty string ("") value, the default values, set by the in-page parameters, will be applied. If you provide a valid value, any default values are overwritten for the specific menu tree.

(array index)
0Menu Width
Sets the menu width for the specific menu tree only.
Integer (pixels)menuWidth
1Left Position
A top-level menu appears at the user's mouse position. This behavior can be overriden by setting this element and/or the next one. The top-level menu will appear at the horizontal page position specified.
Integer (pixels)user mouse position
2Top Position
The top-level menu will appear at the vertical page position specified. Can be used in conjuction with element 2, above, to absolutely position the top-level menu.
Integer (pixels)user mouse position
3Font Color
Sets the font color of the displayed text in the menu tree.
(any valid color identifier)
4Font Color Upon Mouseover
Sets the font color of menu item displayed text, when the user mouses over the item. Explorer always recognizes this variable. Navigator will only implement it if NSfontOver is set to true.
(any valid color identifier)
5Background Color
Sets the background color for all items in the menu tree.
(any valid color identifier)
6Background Color Upon Mouseover
Sets the background color of an item, in the menu tree, when the user mouses over the item.
(any valid color identifier)
7Border Color
Sets the menu border color for the menu tree.
(any valid color identifier)
7Separator Color
Sets the color of the item separator lines for the menu tree. Recognized only by Explorer. Navigator will always render the separator lines in the same color as the global menu border setting, borCol, or the tree-specific setting in element 8.
(any valid color identifier)

The Item-Defining Array Elements
Each group of three array elements defines a menu item.
FirstItem Display
Sets the text to be displayed for the item.
Example"DHTML Diner","http://www.dhtmlab.com/diner/",1
SecondItem URL
(empty string or http: or javascript: URL)
  1. "DHTML Diner","",1
    - no click action

  2. "DHTML Diner","http://www.dhtmlab.com/diner/",1
    - URL to navigate to upon user click

  3. "New Page","javascript:top.location='anotherpage.html'",0
    - script to execute upon user click
ThirdChild Menu
Is there an associated child menu that will pop up when the user mouses over the item?
If set to true, the triangle image will appear in the item, and an associated child menu will be assumed to exist.
true/false, or 1/0.
  1. "DHTML Diner","http://www.dhtmlab.com/diner/",1
    - child menu exists

  2. "DHTML Diner","http://www.dhtmlab.com/diner/",0
    - no child menu

So far, we have provided a sneak-preview of the new Version 4 arrays, and revisited the Version 3 arrays in some detail. Now that we are all on the same page, we can continue with the new stuff!

Produced by Peter Belesis and

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

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