Forum Moderators: not2easy
<script language="JavaScript" type="text/JavaScript">
<!--
menu_status = new Array();
function showHide(theid){
if (document.getElementById) {
var switch_id = document.getElementById(theid);
if(menu_status[theid]!= 'show') {
switch_id.className = 'show';
menu_status[theid] = 'show';
}else{
switch_id.className = 'hide';
menu_status[theid] = 'hide';
}
}
}
//-->
</script>
<a class="home" onclick="showHide('mymenu1')" href="javascript:;">Registration</a>
<div id="mymenu1" class="hide">
<a href="/convention/2007/register/overview.asp" class="submenu"><img src="/images/arrow_green.gif" border="0" /> Overview</a></div>
1. Record it in a cookie or Session variable
2. Record it in a hidden form field that must be included on every page.
The Cookie approach is probably much easier. You'll need to attach a listener to your expand/collapse buttons and the listener will update a cookie with the state of the shown/hidden stuff. And when the page loads, you'll need to look at that cookie to determine which items to show/hide.
Hope that helps.