What is the OnClientClick property
The value of this property should specify a Javascript code to execute when the
item is clicked:
<oem:EasyMenu id="Easymenu1" runat="server"> <Components> <oem:MenuItem InnerHtml="test on client click" ID="menuItem1" OnClientClick="alert('this is a test message');" ></oem:MenuItem> </Components></oem:EasyMenu>
The Javascript code can make use of four parameter passed by Easy Menu to the executing
function in OnClientClick:
·
targetEl - a reference to the element to which
the menu is attached
·
menuObject - a reference to the menu item that
was clicked
·
menuEvent - the event that triggered the item
selection
·
easyMenu - the menu to containing the items that
was clicked belongs to