Dhtmlxtree: How Can I cancel the default action of onClick e


I want to update the contents inside an update panel (asp.net). I want the postback to occur after the user has clicked a node of the tree:

function OnNodeClick(itemid)


// mycode goes here

return false; ← does this work?



MY problem is that after the execution of OnNodeClick, the tree asks the server for the child items xml! I want to cancel that. I want to load the child items when I expand the node.

thank you

“onClick” event in tree is not blockable, so returning false from it will not cause any effect.
But in normal situation just a selection of item ( single click ) will not cause loading of sub-items, it may be triggered by expanding branch or by double-clicking on item.
Please be sure that you are not using any custom code which may trigger item expanding on click