guertzen
09-03-2002, 02:01 AM
I have this script to make a table menu:
function change() {
if(!document.all)
return
if (event.srcElement.className=="expandable"){
var x=event.srcElement.parentElement
if (x.all[2].style.display=="none"){
x.all[2].style.display='';
}
else {
x.all[2].style.display="none"
}
}
}
document.onclick=change
The problem is that when I click on any menu object he keeps expanded and dont contract automatic when I click on another one object menu. Only contract if I click in the same object menu. How can I contract automatic? Thanks and sorry my bad english.
function change() {
if(!document.all)
return
if (event.srcElement.className=="expandable"){
var x=event.srcElement.parentElement
if (x.all[2].style.display=="none"){
x.all[2].style.display='';
}
else {
x.all[2].style.display="none"
}
}
}
document.onclick=change
The problem is that when I click on any menu object he keeps expanded and dont contract automatic when I click on another one object menu. Only contract if I click in the same object menu. How can I contract automatic? Thanks and sorry my bad english.