Menu (R)
Username:  
Password:
  > Home
> User Guide
> Reference
> Portal Object
v Development Guide
    o Overview
    v A Typical Page (C)
       o Prelude
       o Head
       v Body
          o Menu (R)
          o Login (F)
          o Admin Only (F)
          o Settings (F)
    > Data Handling
    > Applications
    > Working BEE


Shortcuts
sys Class
debug Class
Intrinsic Conversions
>> Development Guide >> A Typical Page (C) >> Body >> Menu (R) <=  =>      <  1  2  >  
Menu bar

There are many possible menu designs, such as the "Horizontal Drop" and "Vertical Sweep".  The following code is an illustration of the "Horizontal Drop" menu bar with multi-level drop down submenus:

REUSE ME {code}

The above BEE section produces no visible output.  Instead, it defines a set of JavaScript variables and functions to operate the menu according to the parameters for the "doMenu".  In another word, it is only the definition of the menu.  The menu is built when the xxBuildMenuItemsAtLevel(1) JavaScript is called, followed by xxBuildMenuItemsAtLevel(2) and so on.  (Note: xx stands for the menu object name.)

The location of the BEE "doMenu" and the JavaScript "xxBuildMenuItemsAtLevel" follow these rules:

  1. The order of occurance: BEE function actionMenu, JavaScript function call xxBuildMenuItemsAtLevel(1), xxBuildMenuItemsAtLevel(2), ...
  2. If L1:position is "relative", xxBuildMenuItemAtLevel(1) needs to be in the encapsulating construct.
  3. If L1:position is "absolute" (default), xxBuildMenuItemAtLevel(1) needs to be out of any construct.
  4. xxBuildMenuItemAtLevel(2) and onwards should be in absolute position and therefore must be out of any construct.  (Overwriting Ln:position with "relative" is a no no if n >= 2.)

When L1:position is "absolute" (default), the ideal position for doMenu and the xxBuildMenuItemsAtLevel sequence is near the end of the page before </body>.  This design gives priority to the visible part of the page, leaving the background menu building till the end.  This will give an overall impression of speedy display.  (Yes, the menu appearance will be delayed but in most cases the delay is hardly noticable.)

However, when L1:position is "relative", the xxBuildMenuItemsAtLevel(1) (the top level menu) must be in the encapsulating construct (e.g. a table cell).  Since the menu object creation and the doMenu call must be before the first xxBuildMenuItemsAtLevel, they must be moved up front as well (but after <body>).

Note: Some old platforms (notably IE on Windows 98) cannot handle L1:position = "relative".  It is advisable to use the default (absolute) if the website is expected to be viewed from old operating systems.

Previous Page       Next Page

Accsoft Computer Technology Pty Ltd     ABN: 98 065 617 549
PO Box 892, Epping NSW 1710         Level 1, Epping Office Park, 242 Beecroft Rd, Epping NSW 2121, Australia
Tel: Sydney - (02)98691668     National - 1300-881668         Fax: (02)98691866
© Copyright 2003 Accsoft Computer Technology Pty Ltd