[DOM] Mon script JS ne fonctionne pas sur FIREFOX
Bonjour à tous,
Je suis débutant en JAVASCRIPT et j'ai ptit souci que j'esper régler.
j'ai fais un script qui permet de faire un menu deroulant. Donc, au fait sa fonctionne sur IE mais pas sur Firefox..
Voici donc le code JS:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| function expandCollapse(objElement) {
var imgIcon = objElement.children[0];
objElement = objElement.children[1];
if (objElement.style.display == "none" ) {
objElement.style.display = "block" ;
imgIcon.src = "images/fond/fleche_b.jpg" ;
}
else {
objElement.style.display = "none" ;
imgIcon.src = "images/fond/fleche_g.jpg" ;
}
} |
Voici le code HTML :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| <DIV onclick="expandCollapse(this); ">
<IMG name='I1' SRC="images/fond/fleche_g.jpg" height = '30' width = '30' /> Le langage Javascript
<DIV STYLE="display: none" >
<A onclick="stopPropagation() ;">Page d'accueil</A><BR>
<A onclick="stopPropagation() ;">Etude du langage</A><BR>
<A onclick="stopPropagation());">Les objets clients</A><BR>
</DIV>
</DIV> |
Si vous avez des idées je suis preneur...
Merci