I am new to web programming and I have a question regarding object attaching to layout.
Imagine the following scenario:
/*accordion cell is a layout cell*/
var accordion_menu = accordion_cell.attachAccordion();
var accordion_partners = accordion_menu.addItem("acc_partners", lb_partners);
/*I am attaching a tree*/
var hierarchy_tree = accordion_partners.attachTree();
Lets say that accordion_partners is a global variable and I want to access hierarchy tree from another javascript function. How do I get a reference to the tree object. It seems that there is no function like
The variable hierarchy tree has a local scope. How can I access the tree from another JS function ?
Example:
function treeCreation(){
var hierarchy_tree = accordion_partners.attachTree();
}
function doSomethingWithTheTree(){
/*How do I get a tree reference here ?? */
var my_tree = accordion_partners.get????
}
Since I am new to web to programming, I do not clearly understand what you are asking.
I want to handle my tree from another JS function. To the previous example, I want to be able to do something like :
function treeCreation(){
var hierarchy_tree = accordion_partners.attachTree();
}
function doSomethingWithTheTree(){
/*How do I get a handler for my tree ?? */
var my_tree = accordion_partners.get????
mytree.findItem("x"); /* find item is a dhtmlx tree method */
}
Unfortunatelly there is no such method to get it.
You can either make it global or set it as a property of another object that you can access from the function.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan