Agrajag
02-24-2006, 11:13 AM
hi
i'm trying to create menu boxes which will retract and expand when the title for that box is clicked on. i have some code which seems to me that it should work, but it doesn't.
here is my code (from http://www.tutorio.com/tutorial/javascript-expanding-menu)
<script type="text/javascript">
function switchit(list){
var listElementStyle=document.getElementById(list).style;
if (listElementStyle.display=="none"){
listElementStyle.display="block";
else {
listElementStyle.display="none";
}
}
</script>
an example can be found at http://www.freewebs.com/agrajag/
thanks
i'm trying to create menu boxes which will retract and expand when the title for that box is clicked on. i have some code which seems to me that it should work, but it doesn't.
here is my code (from http://www.tutorio.com/tutorial/javascript-expanding-menu)
<script type="text/javascript">
function switchit(list){
var listElementStyle=document.getElementById(list).style;
if (listElementStyle.display=="none"){
listElementStyle.display="block";
else {
listElementStyle.display="none";
}
}
</script>
an example can be found at http://www.freewebs.com/agrajag/
thanks