Rank: Member Groups: Member
Joined: 5/1/2008 Posts: 16
|
Hi.
I would like to link a toolbar with a menu. every button on the toolbar has a corresponding menuitem. I am specifically looking to fire the menuitem's clicked event when a user clicks on a toolbar button. I am assuming I should set toolbar's SetAutoPostback to false and have a javascript function Client sideonclick. This function will call the menu's clicked event.
On the menuitem, I have RaisesServer Event set to true and the clientside onClicked event which calls a javascript function in case I want to disable the Server raised event ("eo_CancelEvent();").
I am assuming I can set the toolbar's id or value to the same as the menuitems and have the Toolbar's javascript function fire off the menuitem clickevent. But, I just don't know how to do this with EO toolset.
Thanks
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi, I believe your thinking is correct. You would handle the toolbar's ClientSideOnClick and call the menu's client side JavaScript interface to simulate a click. It will be something like this:
Code: HTML/ASPX
<eo:ToolBar ClientSideOnItemClick="on_toolbar_item_click" ....>
</eo:ToolBar>
Code: JavaScript
function on_toolbar_item_click(toolbar, toolbarItem, subMenu)
{
if (toolBarItem.getCommandName() == "Something")
{
var menuItems = Menu1.searchItemsById("Something");
menuItems[0].click();
}
}
This assumes that you have set the corresponding ToolBarItem's CommandName and MenuItem's ItemID to "Something". Thanks
|