In case of Standard edition you may try to use userdata and “onClick” event. The item style (text color and underline text-decoration) can be set by “style” attribute:
I’m using Json and I’m trying to create a link on every node that isn’t a folder. Since I read that the itemtext-tag is only available in Pro-edition, I’m wondering if you can show me an example of linknodes in Json using something similar to http://www.google.com?
I added this code in my Json but nothing happens when pushing the link. Is there something else in addition to “userdata”, that need to be added to make it continue to the URL specified in “content”?
this code works fine but the window.open open automatically a window (like pop up) when my page is loading. What can I do to fix it ? I got IE6&8. IE 8 block the window but not IE6.
thanks for help
I resolve the problem :
tree.attachEvent(“onClick”,function(id){
if (tree.getUserData(id,“href”)!= undefined)
{
window.open(tree.getUserData(id,“href”));
}
return true;
});
And it fix too the problem with " Folders to not have the onClick Event "
In case of Standard edition you may try to use userdata and “onClick” event. The item style (text color and underline text-decoration) can be set by “style” attribute:
http://www.google.com
You should define onClick event handler that will process the userdata you’ve set:
This issue isn’t related dhtmlxTree component. But usually if you want open another url in current window you should modify window.href properly. For more information please refer JavaScript documentation
I’m using connector and I’m trying to create a link on every node that isn’t a folder. I know the itemtext-tag is only available in Pro-edition, and I think that I can achieve it if and onclick attachEvent can be used.
I have found the set_userdata function with TreeDataItem class in tree_connector.php, but I am not sure how to use it. Could you let me know the procedure?