Download: cliquer ici
Retour vers: rubrique "Navigation"
UN MENU SYMPA

Cliquez sur "download" pour télécharger le kit nécessaire.
Compatible IE et NS (vérifier tout de même NS sous Mac...). Personnalisable: Vertical ou horizontal, couleur du fond, des boutons, du texte, taille de l'applet et des polices, relief des boutons, bordure etc. Certes, le script de cette barre peut paraître un brin compliqué de prime abord, mais cet effet se révèle finalement bien organisé et puissant. A étudier avec attention. Toutefois, je vous recommande de le doubler par des liens textes classiques (en bas de page par exemple), dans l'hypothèse où le navigateur de quelques-uns de vos visiteurs refuseraient de l'afficher correctement...



Une autre disposition:



Explications (traduction):
Paramètres:
  * backgroundColor: La couleur de fond de l'applet. (This is the border color if selected with borderSize > 0)
  * canvasbackgroundColor: La couleur autour des boutons des liens du menu principal. 
  * panelbackgroundColor: La couleur du fond des boutons du menu principal.
  * statusbarTextColor: Couleur du texte du lien en-dehors du passage de la souris.
  * statusbarMouseOverTextColor:  Couleur du texte du lien au passage de la souris. 
  * appletFontSize: Taille de la police de caractères. Valeur par défaut= 12. 
  * borderSize: La taille de la bordure, exprimée en pixels. 0 = pas de bordure. Valeur par défaut= 0. [Sa couleur est définie dpar le paramètre "panelbackgroundColor".]
  * menuFontSize: Modifier la taille de la police (of the pulldown menu item lists). Valeur par défaut= 12.
  * textOffset: distance entre les liens (en pixels). 
  * Frame: La cible (target) de la page appelée. Valeur par défaut = "_top" . On pourra aussi renseigner chaque URL à ce sujet (cf infra). 
  * threeD: Deux valeurs possibles: TRUE ou FALSE. 
    • Valeur "true": Pour un effet de bouton en "3D" au passage de la souris. 
    • Valeur par défaut= "false".  
  * menuitem0 - menuitem (n): Définit les liens du menu et des sous-menus. cf infra pour la syntaxe. 
  * item(n)menu(n): Même chose pour les sous-menus. cf l'exemple donné ici.  
  * underlineText: deux valkeurs= TRUE ou FALSE 
  * underlineTextColor: Actif si le paramètre précédent est réglé sur TRUE. Définit la couleur de la ligne. 
  * direction 1 = Pour un alignement vertical   0 = Pour un alignement horizontal. 

Précisions:
  * Couleurs: Vous pouvez les renseigner soit en hexadécimal, soit en RGB. Par exemple: 0xFFFFFF (hex) est égal à "255,255,255" (RGB). 
  * Pour passer outre au paramètre "frame" défini dans l'en-tête de l'applet:
            value = " my_Description | my_url.html > new_frame" 
    Si le symbole ">" figure après l'URL, alors l'applet interprétera çà comme une précision concernant la frame de destination. 
  * L'applet accepte jusqu'à 20 liens.
            < PARAM name = "menuitem0" value = " blablabla "> 
            < PARAM name = "menuitem1" value = " blablabla "> 
              etc 
              etc
            < PARAM name = "menuitem20" value = " blablabla ">        
  * Les sous-menus peuvent contenir 50 liens...
  * Les sous-menus peuvent lancer un menu ou un sous-menu d'une autre "lignée". Dans ce cas, remplacer l'espace alloué à l'URL appelée par (exemple) item1menu0item4
  * Si un seul lien est indiqué au sous-menu, alors le clic sur le bouton lance d'emblée l'URL inscrite au sous-menu, sans affichage de celui-ci
  * Le texte du lien et l'URL appelée sont séparés par le caractère "|".
GB:
Parameter Definition 
  
backgroundColor The background color of the applet. This is the border color if selected with borderSize > 0 
canvasbackgroundColor The background color of the canvas area around the text 
panelbackgroundColor the background color of the main panel area .  
statusbarTextColor The text color of the Text Descriptions 
statusbarMouseOverTextColor  The alternate color of the text description when the mouse is over the text. 
appletFontSize The font size of the text description. Default is 12 if not defined 
borderSize The size of the border in pixels. 0 = no border. The color defined in panelbackgroundColor will be the border color.  Default is 0 if not defined. 
menuFontSize This parameter will change the font size of the pulldown menu item lists. Default if not used is 12 
textOffset spacing ( in pixels) between each of the text bar entries 
Frame This parameter defines where the URL's will be launched to on the page. Default is "_top" . You can also force any individual URL to any frame by overriding this function. See note below. 
threeD Parameter is either TRUE or FALSE. 
If "true" then text will have a "3D" button around them when the mouse is over the image 
Default is "false" if the parameter is not defined  
menuitem0 - menuitem (n)   these are the text descriptions to place on the applet See notes below for format. 
item(n)menu(n) Pulldown menu definitions for the associated text. See notes below for examples.  
underlineText Parameter is either TRUE or FALSE 
underlineTextColor If underlineText is "true", then this is color of the underline 
direction 1 = vertical alignment   0 = horizontal alignment 


Note: All colors are entered in either hexidecimal or decimal RGB format . As an example , the color white = 0xFFFFFF in hex and white = "255,255,255" in RGB format. 


--------------------------------------------------------------------------------

Overriding the frame parameter 

You can override the default frame parameter as follows : 

value = " my_Description | my_url.html > new_frame" 

If the pipe symbol ">" is detected after the URL entry the applet will assume you are referencing a frame and send the URL to that frame rather than the default frame. 
  
  

Text Definitions 

This applet supports up to twenty(20) text entries.  an example is  : 

< PARAM name = "menuitem0" value = " first pulldown menu text description"> 
< PARAM name = "menuitem1" value = " second pulldown menu text description"> 
etc 
etc. 
< PARAM name = "menuitem20" value = "  twentieth pulldown menu text description"> 

--------------------------------------------------------------------------------

Menu definitions 

Menus are attached to each of the above defined text strings as follows : 

the first string is attached to the menu called item0menu0. 
the second string is attached to the menu called item1menu0. 
the third string  is attached to the menu called item2menu0. 
etc. 
 . 
 . 
etc. 

Each menu has up to fifty(50) items associated with it. Each item is defined in the format 

item0menu0item0        the first item in the list 
item0menu0item1        the second item in the list 
etc. 

Each item has two (2) parameters associated with it. The item name that will be displayed in the pulldown list, and the URL that the user will be sent to when the item is selected with a mouse click. The two parameters are seperated with the "|" character. 

referencing sub menus 

A menu item can reference another menu. To do this, put the new menu reference in the value field of the parameter instead of a document page. ( see example code above ) 
As with the other examples we will assume that we are referencing the first text entry. Since the first  menu is called "item0menu0" we reference the sub menu as "item0menu1".   The main menu could also reference another menu called "item0menu2".  To further go down the menu tree, the sub menu "item0menu1" could have a reference to a third menu called "item0menu3". 
The number on the menus is not important. The only restriction is that all menus associated with the first image start with the description "item0" 

Note: Unlike the main menu for the text entry, sub menus need a value parameter. This is the name that appears in the main menu that references the sub menu. 
  
Requested Modification added 05/21/00 

If a pulldown selection contains only one entry, the popup menu will not be displayed. Instead, the URL associated with the entry will be launched when the user clicks the mouse button. This allows you to have a button that does not use a pulldown menu. 
  

Confusing !! Not really ... 
Examine the sample code listed above in the typical applet definitions above and follow the path of the menus. I think you'll find it quit logical when you see the flow of the layout.