Documentation

onBeforeContextMenu

fires before the context menu is called in the item area

boolean onBeforeContextMenu(string id,Event e,HTMLElement node){ ... };

Parameters

idstringthe id of the clicked item
eEventa native event object
nodeHTMLElementthe target HTML element

Returns

booleanreturning false will block the event

Example

$$('list').attachEvent('onBeforeContextMenu', function(id, e, node){
     if (some_check(id)) 
          return false; //blocks the context menu
     else 
          return true;
});

See also

Back to top