PDA

View Full Version : Multi-state node on switch menu



scrupul0us
02-29-2008, 01:31 PM
1) Script Title:
Switch Menu 1

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/switchmenu.htm

3) Describe problem:
--1) need more than node to be able to be open at any given time
--2) need the states of all open/closed nodes to be saved, not just one

Thank you very much for your time and efforts

scrupul0us
03-10-2008, 12:05 PM
i got this to work to allow multi-open-nodes:



function SwitchMenu(obj){
if(document.getElementById){
var el = document.getElementById(obj);
var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
if(el.style.display != "block"){ //DynamicDrive.com change
/*
for (var i=0; i<ar.length; i++){
if (ar[i].className=="submenu") //DynamicDrive.com change
ar[i].style.display = "none";
}
*/
el.style.display = "block";
}else{
el.style.display = "none";
}
}
}


but i have no idea how to save the extra node states or recall them

please help

scrupul0us
04-03-2008, 10:11 PM
Cmon... anyone... not even a comment in over a month!