How to get treenode position (x,y)

i wonder how to get treenode postion(x,y) when context menu click

because i want to create a window at the treenode position.



thank you !





such as the tree has two node,A and B,when i click the B,i want to create a window at the node B position,so i need the clientX and clientY.


Hello,


try to use the following


tree.attachEvent(“onRightClick”,function(id,ev){


var x = ev.clientX;


var x = ev.clientY;





});