Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by josh on Jan 13, 2009 15:27
open dhtmlx forum
dhtmlx menu v2

Hi,

quick question regarding menu v2:

If an item has child items, the parent item doesnot trigger the onclick event!

Is this a bug? If not, how can i force onclick event to trigger on ANY (whether parent or leaf node) item in the menu.


thanks,

j
Answer posted by Support on Jan 14, 2009 00:15
Hello,

This is not a bug. Edit the dhtmlxmenu.js file:

this._doOnClick = function(id, type) {
    ...
    // comment the following lines to reach needed functionality
    if (type.charAt(0)=="c") { return; } // <-- can't click on complex item
    if (type.charAt(1)=="d") { return; } // <-- can't click on disabled item
    if (type.charAt(2)=="s") { return; } // <-- can't click on separator