Simple Menu for NS6

[Total: 0    Average: 0/5]

This shows a simple DHTML menu for IE5 and NS6.

Head Code:

<SCRIPT LANGUAGE=JavaScript> 
var isIE=document.all?true:false;
var isNS4=document.layers?true:false;
var isNS6=navigator.userAgent.indexOf("Gecko")!=-1?true:false;
function Affiche(Chaine){ 
  if(isIE)
  { 
    eval("document.all."+Chaine+".style.visibility='visible'");
  } 
  else if(isNS4)
  {
    /* not sure about the NS4 methods */
    document.layers["Produits"].visibility="visible";
    document.layers["Produits"].hidden="false";
  }
  else if(isNS6)
  {
    document.getElementById("Produits").style.visibility="visible";
  } 
} 
</SCRIPT> 

Body Code:

<A onmouseover=Affiche('Produits') onfocus=Affiche('Produits')>Produits</A><BR> 
<DIV id="Produits" name="Produits" style="visibility:hidden;position:relative"> 
<A HREF="#">Menu A</A> 
<A HREF="#">Menu B</A> 
</DIV> 

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *