Re bonjour à tous,
un nouveau pb de compatibilité entre IE et Mozilla. LE script fonctionne bien sous IE, pas sous Mozilla. Il s'agit d'afficher une barre de menu avec des menus déroulants au passage de la souris. Le code est le suivant:
----------AFFICHAGE DU MENU - APPEL DANS LA PAGE----------
<DIV id=menubar style="POSITION: relative; VISIBILITY: hidden; left: 0px; top: 0px;" class="lienrougemenu">
<table width="100%" border=0 cellpadding=3 cellspacing=0 bgcolor="#A01405" class="lienrougemenu" >
<tbody>
<tr>
<td ><div align="center"><a href="#" class="lienrougemenu" onMouseOver=Show(1) onMouseOut=Hide(1)><%=CategoriesLib(0)%></a></div></td>
<td ><div align="center"><a href="#" class="lienrougemenu" onMouseOver=Show(2) onMouseOut=Hide(2)><%=CategoriesLib(1)%></a></div></td>
</tr>
</tbody>
</table>
</DIV>
----------------------LE SCRIPT----------------------
<SCRIPT language=JavaScript>
<!--
hovercolor = "#A01405"; // color name/code couleur quand on passe
bgcolor = "#D8C791"; // color name/code couleur par défaut
textcolor = "#94AAD6";
background = ""; // picture url
menu_border = 0; // IE only
border_color = "#CCCCCC"; // IE only
arrow_pic = "script740849_0_2.gif"; // url of arrow picture for submenus
//////////////////////////////////////////////////////
if(document.all) { if(!background) { background=bgcolor; } else { background = "url("+background+")"; } }
function LayerSpecs(Left,Top,Width) { if(No3) {
if(document.all) { Top+=7; Left+=2; Width-=6; }
this.left = Left;
this.top = Top;
this.width = Width;
this.info = "";
T=0;
for(i=3; i<arguments.length; i++) {
if(document.all) { this.info += "<TR><TD WIDTH="+Width+" onMouseOver='this.bgColor=\""+hovercolor+"\"' onMouseOut='this.bgColor=\"\"'>"+arguments[i]+"</TD></TR>"; }
else { this.info += "<LAYER onMouseOver='this.bgColor=\""+hovercolor+"\"' onMouseOut='this.bgColor=\""+bgcolor+"\"' WIDTH="+Width+" POSITION=RELATIVE TOP="+T+"> "+arguments[i]+"</LAYER>"; }
T+=20;
}
} }
Layer = new Array();
arrow = "<IMG SRC='"+arrow_pic+"' WIDTH=6 HEIGHT=10 BORDER=0 ALT=''>";
//////////////////////////////////////////////
/*Create Your layers below by typing:
Layer[incrementing number] = new LayerSpecs(Left Position, Top Position, Width, List of Links Seperated by Commas)
If a layer has a sublayer, add onMouseOver="Show(Layer Number to Open, Current Layer, Any Layers Opened before the current layer (seperated by commas)
*/
//Déclaration des layers........
////////////////////////////////////////////////////////////////
j = (Layer[0]) ? 0:1;
for(i=j; i<Layer.length; i++) {
if(document.all && No3) { document.write("<SPAN onMouseOver='clearTimeout(timer)' onMouseOut='Hide("+i+")' ID='L"+i+"' STYLE='position:absolute; visibility:hidden; width:"+(Layer[i].width + 8)+"; background:"+background+"; top:"+Layer[i].top+"; left:"+Layer[i].left+";'><TABLE STYLE='border:solid "+menu_border+" "+border_color+"'>"+Layer[i].info+"</TABLE></SPAN>"); }
else if(document.layers && No3) { document.write("<LAYER onMouseOver='clearTimeout(timer)' onMouseOut='Hide("+i+")' ID='L"+i+"' POSITION=ABSOLUTE VISIBILITY=HIDDEN BGCOLOR='"+bgcolor+"' BACKGROUND='"+background+"' TOP="+Layer[i].top+" LEFT="+Layer[i].left+">"+Layer[i].info+"</LAYER>"); }
}
if(document.all) { document.all["menubar"].style.visibility = "visible"; }
else if(document.layers) { document.layers["menubar"].visibility = "visible"; }
// -->
</SCRIPT>
Partager