Hi,
I need to add a link to this child node
please help me how to add the a href link to above given line.
i need to do ant thanges in JS file to add this link or just need to add the link directly in XML file?
The dhtmlxtree has not built in ability for inline links buy you can next one of two solutions
a) define all in xml
<![CDATA[ Name ]]>
b) mixed
some_value
…
tree.attachEvent(“onClick”,function(id){
document.location.href=tree.getUserData(id,“some_name”);
});
Does the first method only work in the Pro version? I get ‘undefined’ in the output of my tree if I try it in the standard version. If that is the case, does the Pro version support having multiple html links on a single tree line? I’m using the tree to collapse text with URL links and I’d like the children (and parents for that matter) to allow multiple clickable links. Something like this:
* <Parent link 1> <Parent link 2>
** <child link 1> <Child link 2>
Thanks for any information.
Steve
Nevermind… I figured out how to do it using the standard version. I just had to use escaped HTML in the text like this:
"<a href=/path/details?period_type=weekly&start_date=2008-01-01>Name</a> <a href=/path/prog2?period_type=weekly&start_date=2007-01-01>SecondName</a> "
Thanks for your great tree!
Steve
I should mention that I didn’t use the but rather just used the standard
Does the first method only work in the Pro version?
itemtext sub tag supported only in pro version, but you can use escaped data of attribute in standard version for the same purpose
>>support having multiple html links on a single tree line
You can use any HTML as item value ( so you can have multiple links there )
While you can have multiple userdata sections as well - it can’ t be used for such scenario ( onclick event has not info, which part of item text was clicked )