Table of Contents
- Getting Started
- EO.Pdf
- EO.Web
- EO.WebBrowser
- EO.Wpf
- Common Topics
- Reference
- .NET API Reference
- JavaScript API Reference
- EO.Web
- EO.Web
- Objects
- Global Functions
- Global Functions
- eo_Callback
- eo_CancelBubble
- eo_CancelEvent
- eo_DateToString
- eo_FormatString
- eo_GetContainer
- eo_GetEventPos
- eo_GetNavigatorEventInfo
- eo_GetObject
- eo_HideAllPopups
- eo_MsgBox
- eo_RegisterDragTarget
- eo_SetComboBoxValue
- eo_ShowContextMenu
- eo_ShowPopup
- eo_ShowPopupCalendar
- eo_StringToDate
- eo_TriggerServerEvent
- eo_UnregisterDragTarget
- Event Handlers
- EO.WebEngine
- EO.Web
eo_ShowContextMenu Function |
Displays a context menu.
Parameters
- e
-
The parameter can be a DOM event object or an DHTML element.
When e is a DOM event object, the function uses this paramter to determine the mouse cursor position and use it calculate the position of the of the context menu. This parameter can be null for Microsoft Internet Explorer, but must be provided for all other browsers. For those browsers, DOM event object is the first parameter of the event handling function.
When e is a DHTML element, the function aligns the context menu to the lower-left corner of the DHTML element. The top menu group's OffsetX and OffsetY can also be used to fine tune the final position of the context menu.
- menuId
- Menu ID. See remarks section for details.
Return Value
-
Returns false if the context menu has been successively displayed, otherwise true.
The function returns false on success allows you to conveniently display your own popup menu and cancel the default popup menu using one simple statement:
HTML<div oncontextmenu="return eo_ShowContextMenu(event, 'menu1')">test</div>
This function should only be called on a ContextMenu object. Calling it on other type of object would fail.
Usually you can use the ID of the server control as the id parameter to call this function. However, when two server controls resides in different naming containers (for example, two user controls), it's possible for them to have the same ID. In this case you should use the value of the ClientID of the menu control as the id parameter. You may need to use a debugger to find out the ClientID value.