Dear All,
Can any one spot my mistake. I am sure it obvious but i just can see it. I am get two errors in quick succession
LoadXML incorrect XML
DataStructrer XML refers to non existent server
<div id="navigation_tree" style="width: 100px;height: 650px; overflow: auto"></div>
<script>
function treeMenuSelect (nodeId){
if(nodeId != 'home'){
if(nodeId.indexOf('project_') == 0){
pos = nodeId.indexOf('_');
id = nodeId.substr(pos+1);
window.location.replace('/projects/'+ id);
}
if(nodeId.indexOf('iteration_') == 0){
pos = nodeId.indexOf('_');
id = nodeId.substr(pos+1);
window.location.replace('/projectiterations/'+ id);
}
if(nodeId.indexOf('activity_') == 0){
pos = nodeId.indexOf('_');
id = nodeId.substr(pos+1);
window.location.replace('/projectactivities/'+ id);
}
}
}
tree=new dhtmlXTreeObject("navigation_tree","100%","100%",0);
tree.setImagePath("/images/");
tree.enableCheckBoxes(false);
tree.enableDragAndDrop(false);
//tree.enableSmartXMLParsing(true);
//tree.onSelect("treeMenuSelect")
//link tree to controler
tree.setXMLAutoLoading("/MetaPM/navigation/navdata.xml");
//load first level of tree
tree.loadXML("/MetaPM/navigation/navdata.xml?id=0");
tree.attachEvent("onSelect",treeMenuSelect);
</script>
the xml returned is
?xml version='1.0' encoding='iso-8859-1'?>
<tree id="0">
<item text="Projects" id="home" open="1" im0="icons/layers.png" im1="icons/layers.png" im2="icons/chart_organisation.png" call="1" select="1">
<item text="name" id="project_1" im0="icons/report.png" im1="icons/report.png" im2="icons/report.png" open="1" ></item>
<item text="second project" id="project_2" im0="icons/report.png" im1="icons/report.png" im2="icons/report.png" open="1" ></item>
</item>
</tree>
any clues gratefully received, i have been banging my head all afternoon on this one
Julian