Categories | Question details Back To List | ||
dhtmlTree Hello Team, Can a load a XML file which is located at server side.. I am using this code to load xml file from server, but my parent node only visible at browser not child nodes. Kindly assist me. *--------------------------------------------------------* <form method="post" action="nnDelete.jsp"> <table> <span id="buttonId" class="a" >MyDriveWay</span> </a><td></tr> <tr><td> <div id="treeboxbox_tree" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;display:none"/> </td></tr> </table> <script> function tonclick(id){ var str = tree.getItemText(id); document.getElementById("treeboxbox_tree").style.display = "none"; document.getElementById("buttonId").innerHTML = str; }; tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0); tree.setImagePath("images/csh_yellowbooks/"); tree.setOnClickHandler(tonclick); //tree.loadXML("http://www.driveway.com/driveway/userxml/user123.xml"); tree.setXMLAutoLoading("http://www.driveway.com/driveway/userxml/user123.xml"); </script> *-----------------------------------------------------------------------------------* Regards, Nirmala Kolura Answer posted by Support on Jun 24, 2008 02:26 a) you need to use both loadXML and set setXMLAutoLoading commands. setXMLAutoLoading just allows to set the script name, which will be used for sub-calls. You still need to call loadXML , to load top level of tree. b) please be sure that you have correct XML - folder items, which require additional XML loading, must have "child" attribute set in XML - the XML generated to the child items, must have correct value of "id" attribute for top tag in XML ( it must point to ID of related parent item ) |