to make "collapsible menus" use the display property of a div ...
<script>
function toggleChildren(el)
{
var ChildDocumentAllIndex = el.sourceIndex + 1;
var ChildMenuEl = document.all[ChildDocumentAllIndex];
if(ChildMenuEl.style.display == "inline")
ChildMenuEl.style.display = "none";
else
ChildMenuEl.style.display = "inline";
Quote:
}
</script>
<h1 onclick="toggleChildren(this)">menu1</h1>
<div style="display: none;">
subitem 1, 1<br>
subitem 1, 2
</div>
<h1 onclick="toggleChildren(this)">menu2</h1>
<div style="display: none;">
subitem 2, 1<br>
subitem 2, 2
</div>
<h1 onclick="toggleChildren(this)">menu3</h1>
<div style="display: none;">
subitem 3, 1<br>
subitem 3, 2
</div>
this is ie4+ specific code not ns supported because of document.all
notice how we change the display property of the style object from none to
inline
etan