I try to build a tree menu.
The idea is that the submenu is in a hidden absolute position table. By
clicking the folder.gif, the submenu table switces to visible - static,
so opens.
This helps me to put the tree anywhere in a page, and not in x,y position.
It works fine in IE but not in Netscape or Firefox.
Can someone please help me to fix ??
Here is the code :
<html>
<head>
</head>
<script language=javascript>
function viewsub(){
if (view.type == "off"){
view.type="on";
view.style.visibility="visible";
view.style.position="static";
} else {
view.type="off";
view.style.visibility="hidden";
view.style.position="absolute";
}
}
</script>
<body>
<table cellpadding=1 cellspacing=0 border=1>
<td><img src=folder.gif onclick=viewsub()>Open folder
<table border=0 cellpadding=1 cellspacing=0 id="view" type=off
width=95% style="visibility: hidden; position:absolute; left: 0; top: 0">
<td>Sub link</td>
</table>
</td></table>
</body>
</html>