Bonjour,
je suis entrain de faire un menu dynamique mais je n'arrive pas à afficher et cacher mes couches
voici mon code :
------------------------------------ menuDynamique.html ------------------------------------
<html>
<head>
<title>Menu dynamique vertical</title>
<link rel="stylesheet" type="text/css" href="menuDynamiqueVertical.css">
<SCRIPT Language="Javascript" Src="menuDynamiqueVertical.js"></SCRIPT>
</head>
<body>
<table class="tableau" border="1" align="left" width="120">
<tr>
<td onmouseover="this.style.backgroundColor='lightblue'; pop('chapitre1');" onmouseout="this.style.backgroundColor='#003366'; kill('chapitre1');">Chapitre1</td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='lightblue'; pop('chapitre2');" onmouseout="this.style.backgroundColor='#003366'; kill('chapitre2');">Chapitre2</td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='lightblue'; pop('chapitre3');" onmouseout="this.style.backgroundColor='#003366'; kill('chapitre3');">Chapitre3</td>
</tr>
</table>
<table class="chapitre1" border="1" width="120">
<tr>
<td onmouseover="this.style.backgroundColor='lightblue';" onmouseout="this.style.backgroundColor='#003366';">section1</td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='lightblue';" onmouseout="this.style.backgroundColor='#003366';">section2</td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='lightblue';" onmouseout="this.style.backgroundColor='#003366';">section3</td>
</tr>
</table>
<table class="chapitre2" border="1" width="120">
<tr>
<td onmouseover="this.style.backgroundColor='lightblue';" onmouseout="this.style.backgroundColor='#003366';">section1</td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='lightblue';" onmouseout="this.style.backgroundColor='#003366';">section2</td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='lightblue';" onmouseout="this.style.backgroundColor='#003366';">section3</td>
</tr>
</table>
<table class="chapitre3" border="1" width="120">
<tr>
<td onmouseover="this.style.backgroundColor='lightblue';" onmouseout="this.style.backgroundColor='#003366';">section1</td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='lightblue';" onmouseout="this.style.backgroundColor='#003366';">section2</td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='lightblue';" onmouseout="this.style.backgroundColor='#003366';">section3</td>
</tr>
</table>
</body>
</html>
------------------------------------------------------------------------------------------------------
// menuDynamiqueVertical.js
function pop(chapitre){
//alert("pop | chapitre ="+chapitre);
//document.getElementById("'numChapitre'" ).style.visibility="visible";
chapitre.style.visibility='visible';
}
function kill(chapitre){
chapitre.style.visibility='hidden';
}
-------------------------------------------------------------------------------------------------------
/* menuDynamiqueVertical.css */
.tableau {
font-family:verdana;
color:#FFFFFF; /*blanc*/
background-color:#003366; /*bleu foncé*/
text-align:center;
}
.chapitre1 {
visibility:hidden;
font-family:verdana;
color:#FFFFFF; /*blanc*/
background-color:#003366; /*bleu foncé*/
text-align:center;
position:absolute;
left:128px;
top:15px;
}
.chapitre2 {
visibility:hidden;
font-family:verdana;
color:#FFFFFF; /*blanc*/
background-color:#003366; /*bleu foncé*/
text-align:center;
position:absolute;
left:128px;
top:40px;
}
.chapitre3 {
visibility:hidden;
font-family:verdana;
color:#FFFFFF; /*blanc*/
background-color:#003366; /*bleu foncé*/
text-align:center;
position:absolute;
left:128px;
top:65px;
}
----------------------------------------------------------------------------------------------
est ce que vous voyez quelquechose qui ne va pas ?
merci d'avance