ASP.NET Easy Menu Documentation for .NET - Client side

Client-Side Methods

Name Description
method AddItem Adds a new item to the EasyMenu

AddItem(id, type, innerHTML, icon, url, urlTarget, onClientClick, AutoHideMenu, position)
  • id - The id of the item to add.
  • type - The item type to add (MenuItem, MenuSeparator or any custom defined types).
  • innerHTML - The content of the item to add.
  • icon - Icon to display for the item Optional.
  • url - Url to open when item is clicked Optional.
  • urlTarget - Frame where url is to be opened Optional.
  • onClientClick - Javascript code to execute when item is clicked Optional.
  • AutoHideMenu - If true, the menu will autohide Optional.
  • position - The position inside menu where you need to be added Optional.
ob_em_EasyMenu1.AddItem("item1", "MenuItem", "some content");

Note:
     - document.getElementById("EasyMenu1").object is the same as ob_em_EasyMenu1.
     - icon will only be used if menu uses icons.
method RemoveItem Removes an existing item from the EasyMenu

RemoveItem(id)
  • id - The id of the item to remove.
ob_em_EasyMenu1.RemoveItem("item1");

Note:
     - document.getElementById("EasyMenu1").object is the same as ob_em_EasyMenu1.
method attachToControl Attaches an  EasyMenu to a specified element.

attachToControl(id)
  • id - The id of the element to which the EasyMenu should attach (will appear).
ob_em_EasyMenu1.attachToControl("div1");

Note:
     - document.getElementById("EasyMenu1").object is the same as ob_em_EasyMenu1.
method detachFromControl Detaches an  EasyMenu from the elements it is curently attached to.

detachFromControl(id)
  • id - The id of the element from which the EasyMenu should detach (will no longer appear).
ob_em_EasyMenu1.detachFromControl("div1");

Note:
     - document.getElementById("EasyMenu1").object is the same as ob_em_EasyMenu1.
method detachFromAllControls Detaches an  EasyMenu from all the elements it is curently attached to.

detachFromAllControls()

ob_em_EasyMenu1.detachFromAllControls();

Note:
     - document.getElementById("EasyMenu1").object is the same as ob_em_EasyMenu1.
method ob_em_SelectItem Selects the menu item specified by id.

ob_em_SelectItem(id)
  • id - The id of the element that will be selected.
ob_em_SelectItem("item1");

method ob_em_DeselectItem Deselects the menu item specified by id.

ob_em_DeselectItem(id)
  • id - The id of the element that will be deselected.
ob_em_DeselectItem("item1");

method hideMenu Hides the menu.

ob_em_EasyMenu1.hideMenu()

ob_em_EasyMenu1.hideMenu();

Note:
     - document.getElementById("EasyMenu1").object is the same as ob_em_EasyMenu1.
method showMenu Shows the menu.

ob_em_EasyMenu1.showMenu(event, virtualElement, left, top)
  • event - The event that triggered this method.
  • virtualElement - The html element object where the menu will be virtually attached.
  • left - Left absolute position where the menu will be displayed. If none is specified then cursor position will be used.
  • right - Right absolute position where the menu will be displayed. If none is specified then cursor position will be used.
ob_em_EasyMenu1.showMenu(event, this);
ob_em_EasyMenu1.showMenu(event, this, 200, 200);

Note:
     - document.getElementById("EasyMenu1").object is the same as ob_em_EasyMenu1.


Check show menu tutorial.
method SetItemInnerHTML Set the menu item inner HTML.

ob_em_EasyMenu1.SetItemInnerHTML(id, innerHTML)
  • id - The id of the menu item that will be changed.
  • innerHTML - The content of the item to change.
ob_em_EasyMenu1.SetItemInnerHTML('menuItem1', 'New Content');

Note:
     - document.getElementById("EasyMenu1").object is the same as ob_em_EasyMenu1.
method HideItem Hides a menu item.

ob_em_EasyMenu1.HideItem(id)
  • id - The id of the menu item that will be hidden.
ob_em_EasyMenu1.HideItem('menuItem1');

Note:
     - document.getElementById("EasyMenu1").object is the same as ob_em_EasyMenu1.
method ShowItem Shows a hidden menu item.

ob_em_EasyMenu1.ShowItem(id)
  • id - The id of the hidden menu item that will be shown.
ob_em_EasyMenu1.ShowItem('menuItem1');

Note:
     - document.getElementById("EasyMenu1").object is the same as ob_em_EasyMenu1.

Client-Side Properties

Name Description
property SelectedItemId The id of the selected menu item.

ob_em_EasyMenu1.SelectedItemId

Note:
     - document.getElementById("EasyMenu1").object is the same as ob_em_EasyMenu1.
property IsLoaded Determines if the menu is client side fully loaded.

ob_em_EasyMenu1.IsLoaded

Note:
     - document.getElementById("EasyMenu1").object is the same as ob_em_EasyMenu1.

"Superb support and great component suite!"

Anton Beerens

Random testimonial   All testimonials

obout.com
obout.com Home
News
Easy Menu Home 
Easy Menu Home
Download
Site Map
Compare with Text Menu
Examples - 79
Appearance - 11
Live Styles
Horizontal Right To Left
Transparent - over flash
MSDN 2
With rounded corners
Keep Open New
Expand Animations New
Vertical 1
MS Vertical
Vertical Right To Left
Context Menu - 10
World Map
Default
Futura
VSNET
Windows
WindowsXP
Style 1
Style 2
Style 3
Right To Left
Tab Strip - 8
Tab Strip
Live Styles
Tab Strip - With postback New
Parent Child Tabstrip New
Tab Strip - Wizard
Tab Strip - Wizard 2
Add / Remove Tabs
Add / Remove Tabs 2
Time Picker - 1
Time Picker
Populating with data - 5
Binding to DataReader New
Binding to DataTable New
Binding to SqlDataSource New
Binding to ObjectDataSource New
Fast loading time
Multi Column Menu - 2
Multi Column Submenu New
Multi Column Submenu with Icons New
Multiple menus - 3
Multiple menus
Multiple menus 2
Horizontal menu and Tab Strip
Operations - 9
ShowEvent New
Add / Remove Items New
Hide / Show Items New
Menu item inner HTML New
Attach / Detach
Menu Events
OnClientClick
Menu item postback
Show menu New
Align/Position - 4
Align
Advanced Align
Menu Offsets
Position
Integration  - 14
TreeView - 5
Attach to TreeView
Dynamic Loading
Inside callback panel
Select the TreeView node New
TreeView inside Easy Menu
AJAX Page - 3
Inside AJAX Page panel
Inside MS AJAX panel
Add items server side
Grid - 2
Use With Grid
Inside DataGrid column
Inside WindowNew
Build from SiteMap
Over Java Applet
With Data Controls New
Other features - 12
AttachTo
Menu Icons
Menu Customize
Long vertical menus
Long menu items
Disabled menu item
Sub-menus
Dynamic Easy Menu Item
Full Easy Menu width
Hide menu with time delay
Custom sliding effect New
Custom Menu Content New
Knowledge Base - 1
Knowledge Base
Documentation - 4
Server side
Client side
Using the correct path
ChangeLog
Tutorials - 2
Using Database
Postback Persistance