tree.attachEvent(“onClick”,onNodeSelect)
//set function object to call on node select
//see other available event handlers in API documentation
function onNodeSelect(nodeId)
{
…
}
on above code I want to set another string as an argument to onNodeSelect function but unfortunately I can’t.
because it’s default argument - the first is current selected item id and the second is the previous selected item id.
when I set my argument as third an error occurred and say it is undefined.
could you please say to me how can I set my argument ?!
thank you very much
AMIR REZA RAHBARAN
Hello,
all event handlers have predefined set of arguments. This behaviour can not be changed
You can use global variables or any other approach in this case.