I created menu (tree) on my site. When user click on that menu, it will shows two more more menus. It worked on all browser except firefox browser. Can anyone tell me what is the problem?
html code
<li><a href="JavaScript:ok('tree1');">Sport</a></li>
<div id="tree1" style="display:none;">
<li><a href="national_sport.php">National Sport</a></li>
<li><a href="international_sport.php">International Sport</a></li>
</div>
javascript code
function ok(id){
if(document.all(id).style.display == "none") {
document.all(id).style.display="block";
}
else{
document.all(id).style.display="none";
}
}
Thank in advance!