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

Hiermenus Go Forth, I - DHTML Lab | 7

Logo

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.

Element
(array index)
DescriptionValue
0width
Sets the menu width for the specific menu tree only.
Integer (pixels)
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)
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)
3font_color
Sets the font color of the displayed text in the menu tree.
String
(any valid color identifier)
4mouseover_font_color
Sets the font color of menu item displayed text, when the user mouses over the item.
String
(any valid color identifier)
5background_color
Sets the background color for all items in the menu tree.
String
(any valid color identifier)
6mouseover_background_color
Sets the background color of an item, in the menu tree, when the user mouses over the item.
String
(any valid color identifier)
7border_color
Sets the menu border color for the menu tree.
String
(any valid color identifier)
8separator_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 border color.
String
(any valid color identifier)





The Item-Defining Array Elements
Each group of three array elements defines a menu item.
ElementDescription 
FirstItem Display
Sets the text to be displayed for the item.
ValueString
Example"DHTML Diner","http://www.dhtmlab.com/diner/",1
SecondItem URL
ValueString
(empty string or http: or javascript: URL)
Examples
  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.
ValueBoolean
true/false, or 1/0.
Examples
  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