Specifying a user-defined function in the onclick event

How do I specify a user function in the onclick event for the dhtmlxmenu? I want to have a function where I’d define what arguments to send to the function to perform certain actions in the onclick event. The predefined function has fixed arguments that aren’t the ones I need. I want to be able to send to the function other objects and additional information.

onClick handler takes fixed arguments. You may call any other function from it:

menu.attachEvent(“onClick”,function(id){
/your code here/
});