||View All MessagesBack to WebFX|
Could you please give some more information about the MenuItem.prototype.dispatchAction, because when I do:
tmp.dispatchAction = "http://webfx.eae.net";
It says object required, and when I and a function:
tmp.dispatchAction = document.location.href = "http://webfx.eae.net";
It goes directly to the site.
Could You give a example, where the menuItem goes to a site onClick, and still when onMouseOver opens the subMenu?
From: Erik Arvidsson
Sent: July 16, 2003
Subject: Re:Clickable menu item with submenu
You'll need to change the following function:
I think it is enough to remove the return in the sub menu case.
I am using DHTML Menu 4. I have menu items which have submenus.
Is it possible to associate an action with a menu item which has a submenu? Like the following code:
mainMenuBusGrp = new Menu();
subMenuBusDiv = new Menu();
subMenuBusDiv.add( new MenuItem(...) );
mainMenuBusGrp.add( new MenuItem( "Amazon", "http://www.amazon.com", null, subMenuBusDiv ) );
I want to be able to click on "Amazon", and it will trigger some action. If I understand right, it seems like only the leaf can do that.
Can anyone give me some hint?