Tree and context menu

Hi,
I’m ttrying to put a contextual menu on my tree. The code is :

tree = new dhtmlXTreeObject("serviceView", "100%", "100%", 0);
tree.setDataMode("json");
tree.setImagePath("css/imgs/");
tree.attachEvent("onClick", onTreeClick);
menu = new dhtmlXMenuObject();
menu.renderAsContextMenu();
menu.loadFromHTML("menuData", true, function(){});
tree.attachEvent("onRightClick", function(id,e){
	menu.show;
});
tree.loadJSONObject(json, function() {

and the div menuData is :

<div id="menuData" style="display: none;">  
        <div id="m1" text="File">
               <div id="m11" text="New"> <hotkey>Ctrl+N</hotkey></div>
               <div id="ms1" type="separator"></div> 
               <div id="m12" text="Open"><hotkey>Ctrl+O</hotkey></div>
        </div>    
</div>

For the display of the tree, no problem. But with a right-click on it, nothing appears…

What is the problem?
Thanks

Hi,

usage menu.show; to show context menu is not correct.

Here is the correct example:

tree.attachEvent(“onRightClick”, function(id,e){
menu.showContextMenu(e.clientX,e.clientY)
});