Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by anup on Jun 23, 2008 21:03
open dhtmlx forum
dhtmlx tree

when i want to represent tree node using js array the syntax is following
var treeArray = new Array(
["1","0","node 1"],
["2","1","node 1.1"],
["3","2","node 1.1.1"],
["4","0","node 2"] )

now my question is if I want to associate links with the nodes (node 1, node 1.1.1 ) how can I do that?
Answer posted by Support on Jun 24, 2008 02:46
There is no way to store any additional data while loading info from js array.
Basically, if you need to have a link functionality for items, you can define them as HTML tags

var treeArray = new Array(
["1","0","<a href='some.html'>node 1</a>"],
["2","1","node 1.1"],
["3","2","<a href='other.html'>node 1.1.1</a>"],
["4","0","node 2"] )