Hi,
Iam Using setXMLAutoLoading method to load Items dynamically…In this case the id gets passed to the server side correctly.
Is there any way for me to me get the ItemText(i.e. the Node Value) Of the clicked Item???
Can i use itemtext = tree1.getItemText(id); function??
If So please tell me how to use that,as of now iam not attaching any event like,
setOnClickHandler and setOnOpenHandler as it affects the dynamic loading part…
I want both id as well as item’s text Whenever i open a node with dynamic loading functionality…
Thanks in advance.
>>Can i use itemtext = tree1.getItemText(id); function??
This code can be used on client side to get text by ID ( of course, it can be used against already loaded items only )
>>setOnClickHandler and setOnOpenHandler as it affects the dynamic loading part…
If custom code attached to event returns true, it will not affect existing functionality in any way.
If you need to get item text on server side you can use next code
tree.setXMLAutoLoadingBehaviour(“function”);
tree.setXMLAutoLoading(function(id){
tree.loadXML(“some.php?id=”+encodeURIComponent(id)+“text=”+encodeURIComponent(tree.getItemText(id)));
})
Is XMLAutoLoadingBehaviour() is in professional edition???
As of now iam not using XMLAutoLoadingBehaviour() ,iam just using XMLAutoLoading() function and loading the nodes based on the ‘id’ got from the server side…
Is there any other way to pass itemtext in this case??
Is XMLAutoLoadingBehaviour() is in professional edition???
yes
>>Is there any other way to pass itemtext in this case??
only code modification
dhtmlxtree.js , line 4154
this.loadXML(src+getUrlSymbol(src)+“uid=”+sn+"&id="+this._escape(id));
you can modify url line in any necessary way