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


Assuming that you have
tree = new dhtmlXTreeObject(…
You can add the next codeline
//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;
}) … nt_onclick