Hello StackOverFlow,
I am using the Ext JS library for creating my application. I have a tree panel that has tree nodes and children tree nodes. These tree nodes have leafs that I would like to be able to access. I've been searching for a while, but cannot find a function of property to access the leafs :(
Some code is here:
var i;
var j = 0;
var selectedLayers = new Array();
while(layerRoot.lastChild.hasChildNodes()){
alert(layerRoot.lastChild.firstChild);
for(i = 0; i < layerRoot.lastChild.firstChild.childNodes.length; i++){
if(layerRoot.lastChild.firstChild.childNodes[i].isSelected()){
selectedLayers[j] = layerRoot.lastChild.firstChild.childNodes[i].attributes.text;
alert(selectedLayers[j]);
j++;
}
}
layerRoot.lastChild.removeChild(layerRoot.lastChild.firstChild);
}
layerRoot.removeChild(layerRoot.lastChild);
I've tried layerRoot.lastChild.firstChild.childNodes, but this doesn't work since the children of layerRoot.lastChild.firstChild are leafs :(. Your time and feedback is very appreciated.
elshae