Having a bit of trouble with this code for collapsable menus. Here is what I have:
Code:
<html><head>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
<meta http-equiv="MSThemeCompatible" content="Yes">
<link rel="stylesheet" href="../cp.css">
<script language="JavaScript" type="text/javascript">
<!--
function expand(listID) {
        if (listID.style.display=="none") {
                listID.style.display="";
        }
        else {
                listID.style.display="none";
        }
        window.event.cancelBubble=true;
}
function contract(listID) {
        if (listID.style.display=="show") {
                listID.style.display="";
        }
        else {
                listID.style.display="none";
        }
        window.event.cancelBubble=true;
}
//-->
</script></head>
<body> blah blah blah stuff
<table>blah blah blah
<DIV id="p1h" style="display:show">
<tr class='tblhead'><td colspan='2'><a name=""><font size='1'><b><span class='tblhead'><a style="cursor:pointer;cursor:hand" name="sign" onClick="expand(p1e);contract(p1h);">+</a>Deflated Menu</span></b></font></a></td></tr>
</DIV>
<DIV id="p1e" style="display:none">
<tr class='tblhead'><td colspan='2'><a name=""><font size='1'><b><span class='tblhead'><a style="cursor:pointer;cursor:hand" name="sign" onClick="contract(p1e);expand(p1h);">-</a>Hey!  Stuff to show!</span></b></font></a></td></tr>
<tr class='firstalt' valign='top'><td>
All my cell information here...
</td></tr></DIV>
</table>
See, for some reason, it shows both divs. Onclick produces no error in my browser, but for some reason won't do squat. Any suggestions? And hey, if you got a better code for this, I would be very interested in it as well!