







|
|
|
 |
| > Menu dynamique ? |
[ Posté par bigdar ] [ Détails ] [ Contact ] [ Citer ]
[ Posté le 13-01-2004 à 10:37 | 46 messages ]
  Hello à tous,
Je viens de prendre le script pour un menu dynamique présent sur ce site; voici la page :
http://www.editeurjavascript.com/scripts/scripts_nav_12.php
En fait, ce sript est parfait mais le problème, c'est qu'il faut cliquer en dehors du menu pour qu'il disparaisse...
Je voudrais que le menu disparaisse automatiquement lorsque la souris n'est plus dessus...
Quelq'un peut-il m'aider ?
Voici le script :
posYmenu = 231;
bgcolor='#2D4F7C';
bgcolor2='#5B7DAA';
backg='img/fond.jpg';
background2='img/fond2.jpg';
needcenter =true;
if(!needcenter)
posXmenu = 10;
else
{ if (document.all)
posXmenu = (document.body.clientWidth/2)-(750/2);
else
posXmenu = (window.innerWidth/2)-(750/2);
}
document.write('<style type="text/css">');
document.write('.popper { POSITION: absolute; VISIBILITY: hidden; z-index:3; }')
document.write('#topgauche { position:absolute; top:'+posYmenu+'px; left:'+posXmenu+'px; z-index:10; }')
document.write('A:link.ejsmenu {color:#FFFFFF; text-decoration:none;}')
document.write('A:hover.ejsmenu {color:#FFFFFF; text-decoration:underline;}')
document.write('A.ejsmenu {color:#FFFFFF; text-decoration:none;}')
document.write('</style>')
document.write('<DIV class=popper id=topdeck></DIV>');
/*
LIENS
*/
zlien = new Array;
zlien[0] = new Array;
zlien[1] = new Array;
zlien[2] = new Array;
zlien[3] = new Array;
zlien[4] = new Array;
zlien[0][0] = '- <A HREF="http://www.google.fr" CLASS=ejsmenu>Qui sommes nous</A>';
zlien[0][1] = '- <A HREF="http://www.google.fr" CLASS=ejsmenu>Qui fait quoi</A>';
zlien[0][2] = '- <A HREF="http://www.google.fr" CLASS=ejsmenu>Coordonnées</A>';
zlien[0][3] = '- <A HREF="http://www.google.fr" CLASS=ejsmenu>Performances</A>';
zlien[0][4] = '- <A HREF="http://www.google.fr" CLASS=ejsmenu>Plan du site</A>';
zlien[1][0] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>la semaine</A>';
zlien[1][1] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Le week-end</A>';
zlien[1][2] = '- <A HREF="quotidiens.php" CLASS=ejsmenu>Les RDV quotidiens</A>';
zlien[1][3] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Les chroniques</A>';
zlien[1][4] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Les émissions</A>';
zlien[1][5] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Les reportanges</A>';
zlien[2][0] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Les immanquables</A>';
zlien[2][1] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>invité d honneur</A>';
zlien[2][2] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Les bons plans</A>';
zlien[3][0] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Le forum</A>';
zlien[3][1] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Le chat</A>';
zlien[3][2] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Newsletter</A>';
zlien[3][3] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Playlist</A>';
zlien[4][0] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Pratique</A>';
zlien[4][1] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Recherche voyage</A>';
zlien[4][2] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Musique</A>';
zlien[4][3] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Telechargements</A>';
zlien[4][4] = '- <A HREF="http://www.alaune.com" CLASS=ejsmenu>Liens</A>';
var nava = (document.layers);
var dom = (document.getElementById);
var iex = (document.all);
if (nava) { skn = document.topdeck }
else if (dom) { skn = document.getElementById("topdeck").style }
else if (iex) { skn = topdeck.style }
skn.top = posYmenu+24;
function pop(msg,pos)
{
skn.visibility = "hidden";
a=true
skn.left = posXmenu+pos;
var content ="<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#000000 WIDTH=150><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=1>";
pass = 0
while (pass < msg.length)
{
content += "<TR><TD BGCOLOR="+bgcolor+" onMouseOver=\"this.style.background='"+bgcolor2+"'\" onMouseOut=\"this.style.background='"+bgcolor+"'\" HEIGHT=20><FONT SIZE=1 FACE=\"Verdana\"> "+msg[pass]+"</FONT></TD></TR>";
pass++;
}
content += "</TABLE></TD></TR></TABLE>";
if (nava)
{
skn.document.write(content);
skn.document.close();
skn.visibility = "visible";
}
else if (dom)
{
document.getElementById("topdeck").innerHTML = content;
skn.visibility = "visible";
}
else if (iex)
{
document.all("topdeck").innerHTML = content;
skn.visibility = "visible";
}
}
function kill()
{
skn.visibility = "hidden";
}
document.onclick = kill;
document.write('<DIV ID=topgauche><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#000000 WIDTH=750><TR><TD ><TABLE CELLPADING=0 CELLSPACING=1 BORDER=0 WIDTH=100% HEIGHT=25><TR>')
document.write('<TD WIDTH=150 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[0],0)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onClick="pop(zlien[0],0)" href=# CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana"><b>La radio</b></FONT></a></TD>')
document.write('<TD WIDTH=150 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[1],150)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onMouseOver="pop(zlien[1],150)" href=# CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana"><b>Programmes</b></FONT></a></TD>')
document.write('<TD WIDTH=150 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[2],300)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onMouseOver="pop(zlien[2],150)" href=# CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana"><b>Evenements</b></FONT></a></TD>')
document.write('<TD WIDTH=150 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[3],450)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onMouseOver="pop(zlien[3],150)" href=# CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana"><b>Communauté</b></FONT></a></TD>')
document.write('<TD WIDTH=150 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[4],600)" onMouseOut="this.style.background=\''+bgcolor+'\'"><A onClick="return(false)" onMouseOver="pop(zlien[4],150)" href=# CLASS=ejsmenu><FONT SIZE=1 FACE="Verdana"><b>Bonnes adresses</b></FONT></a></TD>')
document.write('</TR></TABLE></TD></TR></TABLE></DIV>')
MERCI DE VOTRE PRECIEUSE AIDE !!!
________________ -------------------------
 
|
[ Posté par GhislainLavoie ] [ Détails ] [ Contact ] [ Citer ]
[ Posté le 13-01-2004 à 21:51 | 3179 messages ]
  Salut,
Y'a une solution ici :
http://www.editeurjavascript.com/forums/viewtopic.php?topic=17409&forum=7
A+, Ghislain
________________ La clarté est synonyme de bon service...
Soyez explicites avec vos demandes!!!
| [ Posté par bigdar ] [ Détails ] [ Contact ] [ Citer ]
[ Posté le 14-01-2004 à 10:28 | 46 messages ]
  Merci de ta réponse !
Je vais tester !
________________ -------------------------
|
|
Services email :
  Vous devez vous identifier pour profiter des services par email du forum.
|

|