Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by pradeep on Dec 20, 2008 08:16
open dhtmlx forum
Open all tree nodes does not work in firefox/mozilla 3.0 ( may be its true with any version of firefox).

Answer posted by pradeep on Dec 20, 2008 08:18

var dhxWins = new dhtmlXWindows();
dhxWins.setImagePath("js/dhtmlxWindows/codebase/imgs/");
dhxWins.enableAutoViewport(true);
dhxWins.setSkin("clear_green");
if(!dhxWins.window("modify_standard")){ //
w1 = dhxWins.createWindow("modify_standard",10, 10, 600, 500);
w1.center();
w1.setText("Lineage Tree");
tree1=new dhtmlXTreeObject('treebox1',"100%","100%",0);
tree1 = w1.attachTree();
tree1.setImagePath("js/dhtmlxTree/codebase/imgs/");
tree1.loadXML('<% out.print(Constants.APPLICATION_URL); %>'+"ontologysearch.do?Lineage=lineage&lineagegoid=GO:0005634");
tree1.openAllItems(0);
} else {
dhxWins.window("modify_standard").show();
dhxWins.window("modify_standard").center();
}

 

Hi,

The dhtmlxtree does not display tree in open state. however works fine in IE. could you please help with it. The code we are using is included above.

Answer posted by Support on Dec 22, 2008 03:25
Data loading is async, you need to call the command only after data loaded in tree

tree1.loadXML('<% out.print(Constants.APPLICATION_URL); %>'+"ontologysearch.do?Lineage=lineage&lineagegoid=GO:0005634",function(){
        tree1.openAllItems(0);
});