Folks, I have difficulty in tree.refreshItems
I managed to drag the item, but I can not restore it.
This is my xml:
<?xml version='1.0' encoding='iso-8859-1'?>
<tree id="0" >
<item text="Academico" id="105777" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Agenda" id="105778" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Barra de Ferramentas" id="105779" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Blogger" id="105016" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" aCol="red" sCol="red" nocheckbox="1" locked="1">
<item text="Blog" id="105019" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Comentário" id="105020" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Post" id="105021" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
</item>
<item text="Desktop" id="105780" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Diretorio" id="105781" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Earth" id="105782" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Gmail" id="105017" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" aCol="red" sCol="red" locked="1" nocheckbox="1">
<item text="Assunto" id="105022" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Dados Cadastrais" id="105023" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="E-mail" id="105024" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="IP" id="105025" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Log" id="105026" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
</item>
<item text="Google" id="105783" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Google Chrome" id="105784" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Grupos" id="105785" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="IGoogle" id="105786" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Imagens" id="105787" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Livros" id="105788" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Maps" id="105789" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Orkut" id="105018" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" locked="1" aCol="red" sCol="red" nocheckbox="1">
<item text="Comunidade" id="105027" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Perfil" id="105028" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Post" id="105029" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Scrap" id="105030" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
</item>
<item text="Pack" id="105790" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Pesquisa de Blogs" id="105791" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Pesquisa na Web" id="105792" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Picasa" id="105793" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Sketchup" id="105794" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Talk" id="105795" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
<item text="Youtube" id="105796" im0="icon_success.gif" im1="icon_success.gif" im2="icon_success.gif" checked="1"></item>
</tree>
This is my code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="STYLESHEET" type="text/css" href="../plugin/dhtmlx/dhtmlx/dhtmlxTree/codebase/dhtmlxtree.css">
<script src="../plugin/dhtmlx/dhtmlx/dhtmlxTree/codebase/dhtmlxcommon.js"></script>
<script src="../plugin/dhtmlx/dhtmlx/dhtmlxTree/codebase/dhtmlxtree.js"></script>
<script src="../plugin/dhtmlx/dhtmlx/dhtmlxTree/codebase/ext/dhtmlxtree_li.js"></script>
<script src="../plugin/dhtmlx/dhtmlx/dhtmlxTree/codebase/ext/dhtmlxtree_lf.js"></script>
<script src="../plugin/dhtmlx/dhtmlx/dhtmlxTree/codebase/ext/dhtmlxtree_xw.js"></script>
<title>Tree</title>
</head>
<table>
<tr>
<td valign="top">
<div id="treeboxbox_tree" style="width:250px; height:518px;background-color:#f5f5f5;border :1px solid Silver;">
<div style="display:none; width:100%; height:100%; background-color:black;" id="b_1">
<table width="100%" height="100%" align="center">
<tr align="center" valign="middle">
<td align="center" valign="middle">
<h1 style="color:red; text-align:center; vertical-align:middle;">Loading</h1>
</td>
</tr>
</table>
</div>
</div>
</td>
<td style="padding-left:25px" valign="top">
<div id="treeboxbox_tree2" style="width:250px; height:518px;background-color:#f5f5f5;border :1px solid Silver;overflow:hidden;"/>
</td>
<td style="padding-left:25" valign="top">
<a href="javascript:void(0)" onClick="tree.refreshItems('710583','tree_radio.xml')">Restore</a><br><br>
</td>
</tr>
</table>
<br>
<script>
tree = new dhtmlXTreeObject("treeboxbox_tree", "100%", "100%", 0);
tree.setSkin('dhx_skyblue');
tree.setImagePath("../plugin/dhtmlx/dhtmlx/dhtmlxTree/codebase/imgs/");
tree.enableCheckBoxes(1);
tree.enableDragAndDrop(1);
tree.enableMultiselection(0,0);
tree.enableHighlighting(false|false);
tree.enableSmartXMLParsing(1);
tree.setOnLoadingStart(func_a);
tree.setOnLoadingEnd(func_b);
tree.enableThreeStateCheckboxes(true);
tree.loadXML("tree_radio.xml");
tree2 = new dhtmlXTreeObject("treeboxbox_tree2", "100%", "100%", 0);
tree2.setSkin('dhx_skyblue');
tree2.setImagePath("../plugin/dhtmlx/dhtmlx/dhtmlxTree/codebase/imgs/");
tree2.enableCheckBoxes(0);
tree2.enableDragAndDrop(1);
tree2.setDragBehavior("sibling");
function func_a() {
document.getElementById("b_1").style.display = "";
}
function func_b() {
document.getElementById("b_1").style.display = "none";
}
</script>
<body>
</body>
</html>
And this is the error screens:
Could anyone help me?