That can be done but, it will also logically give rise to this situation:
If sc2 (or whatever content you have used for this [see *]) is the only one open and the user tries to contract it, nothing will happen.
If that is OK with you, here's how - Go back to the two lines we added before at the end of do_onload() and remove this one:
Code:
expandcontent(statecollect[1].parentNode, 'sc2');
At the end of the sweeptoggle(ec) function, just after:
add these two lines:*
Code:
if (ec=="contract")
expandcontent(statecollect[1].parentNode, 'sc2');
Finally, at the end of the expandcontent(curobj, cid) function where it looks like this:
Code:
revivestatus()
}
}
}
Make it look like this:
Code:
revivestatus()
}
}
for (i = 0; i < ccollect.length; i++)
if (ccollect[i].style.display=='block')
return;
sweeptoggle('contract')
}
* If you want a different one than sc2 to be given this treatment,
change the sc2 to the id of your choice and make
the number 1 in statecollect[1] be one less than the sc#.
Bookmarks