» Forums
» DynarchMenu forum
» Support
» enabling a disabled submenu
enabling a disabled submenu
2006/07/27 17:46
Viewed 2903 times
Replies: 0/0

hiya

love the menu, very easy to set up and are perfect for what we are trying to do.

just one thing i cant see to get my head round, and that is enabling a disabled menu from a checkbox. onload of the page, i have the menu set up and working, with one submenu disabled by design. upon a checkbox being clicked, i'd like to then enable said menu... given that the rough code for it is:

in the body onload: DynarchMenu.setup('menu', {electric: 250});

within the page:

<ul id="menu">
<li id="item-new">
... menu one code in here...
</li>
<li></li>
<li id="item-tools" class="disabled">
... menu two code in here - this is the one i want to re-enable ...
</li>
</ul>

is there any way of instantiating the menu.items object using the body onload? so that onclick of a checkbox i can do a:

menu.items["item-tools"].disable(false);

im sure its something really simple, but i just cant see what!

thanks,

robin

Google