Run Javascript Function From Tree
So i have a tree, but i want to run a javascript function when they click on one of the items.
where or how do i set that?
var treeText = ["", "Home", "Favorites", "Font size", "Search", "Child node 1", "Child node 2","This is 7"];
var treeImage = ["", "home"];
var treeView = {0:[1, 2, 3, 4], 1:[5, 6], 2:[5, 6], 3:[5, 6], 4:[9]};
var tree = new AW.UI.Tree;
tree.setId("tree1");
tree.setStyle("width","100%");
tree.setStyle("height","100%");
tree.setStyle("border","0px");
tree.setItemText(treeText);
tree.setItemImage(treeImage);
tree.setViewCount(function(i){return treeView[i] ? treeView[i].length : 0});
tree.setViewIndices(function(i){return treeView[i]});
tree.setCurrentItem(1);
tree.refresh();
where or how do i set that?
var treeText = ["", "Home", "Favorites", "Font size", "Search", "Child node 1", "Child node 2","This is 7"];
var treeImage = ["", "home"];
var treeView = {0:[1, 2, 3, 4], 1:[5, 6], 2:[5, 6], 3:[5, 6], 4:[9]};
var tree = new AW.UI.Tree;
tree.setId("tree1");
tree.setStyle("width","100%");
tree.setStyle("height","100%");
tree.setStyle("border","0px");
tree.setItemText(treeText);
tree.setItemImage(treeImage);
tree.setViewCount(function(i){return treeView[i] ? treeView[i].length : 0});
tree.setViewIndices(function(i){return treeView[i]});
tree.setCurrentItem(1);
tree.refresh();
Joe Fox
February 3,