Code: Select all
with(milonic=new menuname("FileMenu")){
style=menuStyle;
aI("text=New;url=javascript:menuclick(\"my parameter\",this);");
aI("text=Open;url=http://milonic.com/contact.php;");
aI("text=Delete;url=http://milonic.com/newsletter.php;");
}
Code: Select all
function menuclick(text,obj)
{
alert(text);
}
Looking at http://milonic.com/menu_methods.php it looks like gmobj("FileMenu") will get me the menu, but how do I get a reference to the clicked menu item? Is there a way of finding it's id (then I can use gmobj) or a way of getting a reference to the nth item in a menu (that I could then pass as a paramenter)?
What I am trying to do is to build a menu to allow the visibility of elements on the page to be controlled, and need a tick image to be toggled on and off depending upon weather or not that layer is currently showing.
Any help or pointers much appreciated
-Michael