How to use the onclick event with dhtmlxtree?

Someone show me how to use the onclick event, sorry for my English, I’m Latino … I did my tree but I need the onclick event, please someone help me with this issue



Thanks

Assuming that you have
tree = new dhtmlXTreeObject(…
You can add the next codeline
tree.attachEvent(“onClick”,function(id){
//code below is called , each time when item clicked in a tree
alert("Item "+id+“was clicked”); // this can be replaced with any custom code

return true;
})

dhtmlx.com/dhxdocs/doku.php? … nt_onclick