probleme fonction mouseover
Bonjour a tous,
J'ai crée un menu, avec 2 images: 1 etat normal, et une qui s'affiche lorsqu' il y a mouseover et lorsqu'il y a selection.
Mon problème est que les boutons restes sur l'etat mouseover meme si je clique sur une autre sous catégorie
voici les differente partie de code:
generation du menu:
Code:
1 2 3 4 5 6 7 8 9 10
|
function showbureauSubmenu($lSub)
{
if($lSub == 0)
{
$lSub = 1;
}
$sub = '<table width="576" border="0" cellspacing="0" cellpadding="0" height="27" style="margin-bottom:10px">
<tr height="27" style="background-image:url(./media/imgs/nav/bureau_back.jpg)">'; |
sous menu1:
Code:
1 2 3 4 5 6 7
|
$sub .= '<td width="78" height="27">
<td class="submenu" ' . ($lSub != 1 ?'style="background-image:url
(./media/imgs/nav/bureau_back_rol.jpg); text-
align:center"' : 'onmouseover="this.style.background=\'url(./media/imgs/nav/bureau_back_rol.jpg)\'"
onmouseout="this.style.background=this.style.background=\'url(./media/imgs/nav/bureau_back.jpg)\'" style="text-align:center"' ) . '
onclick="document.location=\'bureaux\'" ><nobr>1-BUREAUX</nobr></td> |
sous menu2:
Code:
1 2 3 4 5 6 7
|
<td width="82" height="27"><td class="submenu" ' . ($lSub !=
2 ?'style="background-image:url(./media/imgs/nav/bureau_back_rol.jpg); text-align:center"' : 'onmouseover="this.style.background=\'url(./media/imgs/nav/bureau_back_rol.jpg)\'"
onmouseout="this.style.background=this.style.background=\'url
(./media/imgs/nav/bureau_back.jpg)\'" style="text-align:center"' ) . '
onclick="document.location=\'caissons_pour_bureau\'" ><nobr>1-
CAISSONS</nobr></td> |
merci pour vos réponses