Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Amir Reza Rahbaran on Jun 22, 2009 08:03
open dhtmlx forum
dhtmlx treeview onNodeSelect

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
Answer posted by Alex (support) on Jun 23, 2009 01:03

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.