I have a tree object. The objects ID = resourceTreeGrid
I’m trying to a local add using tree.add()
The id field of the tree is ItemLoc
My script looks like this
functionaddTreeItem(name,parent,itemLoc){
alert(“Name:”+name+"
“+“Parent:”+parent+”
“+“ItemLoc:”+itemLoc);
var selectedNode = resourceTree.getSelectedRecord();
alert(selectedNode.ItemLoc+” "+selectedNode.ReportsTo);
resourceTreeGrid.add({ItemLoc:itemLoc, ReportsTo:parent, NAME:name,BRANCH:“private”,ISFOLDER:“true”},parent);
}
The alerts are my debug stuff. I can clearly see the right stuff is coming in, and as long as the node I’m putting this child into reports to the parent, and it should adding it to the parent. It should refresh. I get no firebug alert. Its looks like I’m firing off correctly.
Any ideas about what I’m doing wrong?