Hi ,
Atlast I found the length of the dTree
dTree.prototype.length=function(urls){
for (var n=0; n<this.aNodes.length; n++) {
if (this.aNodes[n].url==urls){
var frame= this.aNodes[n].target;
return n;
}
and I am using frames to display the contents for the node selected.
i.e I have divided page into 2 frames one contains dtree and other the contains of the node when selected. I am selecting the required node when page loads...below is my script
<script type="text/javascript">
d = new dTree('d');
d.add(0,-1,'My example tree');
d.add(1,0,'Node 1','HelpFiles/first.htm');
d.add(2,0,'Node 2','example01.html');
d.add(3,1,'Node 1.1','example01.html');
d.add(4,0,'Node 3','HelpFiles/first.htm','Node 3','showframe');
d.add(5,3,'Node 1.1.1','HelpFiles/second.htm','Node 1.1.1','showframe');
d.add(6,5,'Node 1.1.1.1','example01.html');
d.add(7,0,'Node 4','HelpFiles/second.htm','Node 1.1.1','showframe');
d.add(8,1,'Node 1.2','example01.html');
d.add(9,0,'My Pictures','example01.html','Pictures I\'ve taken over the years','','','img/imgfolder.gif');
d.add(10,9,'The trip to Iceland','example01.html','Pictures of Gullfoss and Geysir');
d.add(11,9,'Mom\'s birthday','example01.html');
d.add(12,0,'Recycle Bin','example01.html','','','img/trash.gif');
document.write(d);
var n=d.length('HelpFiles/second.htm');
d.openTo(n);
d.s(n); and
when i run the program the node is getting selected but I am struck in displaying the contents of that selected node. (no clicking only selected node when the page is loaded). Any help will appreciated.
thanks
Infyniti
[ September 15, 2005: Message edited by: infyniti molugu ]