navigation script uncompatable

wxdqz

New Member
the following script is for a dropdown navigation tree, is it possible to make it compatable with all browsers?

menu.js
<!--
var ns6 = document.getElementById && !document.all ? 1 : 0
var folder = ''

function expand(curobj) {
folder = ns6 ? curobj.nextSibling.nextSibling.style : document.all[curobj.sourceIndex + 1].style

if (folder.display == "none")
folder.display = ""
else
folder.display = "none"

return 0
}

function doNothing() {
return
}
//-->


html file
<a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:doNothing()" onclick="javascript:expand(this)" class="header">Example Header1</a>
<div style="display: none;">
<a href="info.php" class="link">Example Link</a><br />
<a href="info.php" class="link">Example Link</a><br />
<a href="info.php" class="link">Example Link</a><br />
<a href="info.php" class="link">Example Link</a><br />
</div>


any help is greatly appreciated
 
Back
Top