during the former edition i got the method : but it doesn’t work on the edition 3.0
dhtmlXTreeObject.prototype.getFirstNodeId =function()
{
var tempId = this.rootId;
var temp=this._globalIdStorageFind(tempId);
if(temp)return temp.childNodes[0].id;
else return “”;
};
thanks a lot but i’ve got null the follow is my code
function itemOnclick(id){
var url = “openUserWorkList.action?pd.id=”+id;
window.parent.frames[“mainIframe”].location.href=url;
}
function treeInit(){
tree=new dhtmlXTreeObject(“treeboxbox_tree”,“100%”,“100%”,0);
tree.setImagePath("<%=path%>/resource/dhtmlxTree/codebase/imgs/");
tree.enableCheckBoxes(0);
tree.setOnClickHandler(itemOnclick);
try{
var date = new Date();
tree.setXMLAutoLoading(“workDiaryProjectTreeXML.action?”+date.getTime());
tree.loadXML(“workDiaryProjectTreeXML.action”);
}catch(ex){
}
var tempId = tree.rootId;
var id = tree.getItemIdByIndex(tempId ,0);
alert(id);
}