Check documentation for the latest version of dhtmlxSuite onClick DHTMLX Docs

onClick

fires when the text part of a tree item is clicked, but after the default onClick functionality has been processed

boolean onClick(string|number id);
idstring|numberid of the clicked item
booleantrue|false, to confirm/deny an item's selection

Example

myTree.attachEvent("onClick", function(id){
    // your code here
});
 
// if the tree contains items with link-like functionality
myTree.attachEvent("onClick",function(id){
    window.open(myTree.getUserData(id,"href"));
    return true;
});

Details

The event is blockable. Returning "false" will prevent the default action.

Back to top