Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by John McClelland on Apr 24, 2008 07:01
open dhtmlx forum
are we not able to access the onlick for each individual menu item? the documentation is really fuzzy on this...

Answer posted by Support on Apr 25, 2008 04:19
The common approach is to use single event handler for all menu bar.

menu.setOnClickHandler(function(id){
    alert(id+" was clicked");
});

The component has a way to assign specific event handlers for each item as well

menu.getItem("ID").setSecondAction(function(){
    //personal event handler
});