Forum Moderators: open
<div id="museum" class="button" >
<span style="cursor: hand" class="buttonlabel" onclick='toggleMenu(this)'>
<img src='../index_images/menu/closed-menu.gif'
title='click for museums'
longdesc=''>Museums</span>
</div>
But I can't figure out the right combination of id's, classes, and other attributes to replicate the 'togglemenu(this)' call.
I've tried things like this:
onload="toggleMenu(document.all.museum.button.buttonlabel)";
and this
<BODY onload="toggleMenu(document.all.button.buttonlabel='museum')";
without success and to some extent by trial and error.
The reason I need this is so the menu tree on a webpage will pre-open on one topic like "museums", while leaving the others closed (instead of loading with them all closed). But the java script is very complex and I don't want to work it all out (plus it was all provided on one line, making it hard to read).
It didn't make the menu open....but after a little diagnotics I found the activateMenu(id) function that does make the menu open!
(In order not to waste your time (and any more of mine) in case the function wasn't doing what I thought it would I put an
alert("toggleMenu has been called");
line into the javascript so that I could be sure when it was being called by onload).