Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: numeber of subnudes-Urgent
bird
Junior Member

Posts: 7
Registered: 2/14/2006
Member Is Offline
posted on 3/23/2006 at 09:55 AM Reply With Quote
numeber of subnudes-Urgent


hi all ,

i want to ask you a question: when i am selecting a node in
the tree i can get its number (javascript: trees[0].toggle(78) for node 78 ) i could get it from o_root.o_selected.n_id.
My question is how i can know the number of the last subnode of this node.
for example: node number 78 has 5 subnodes that could
mean that the last subnode is 78+5=83 . But its not the correct answer when a subnode has sones.

So i could know the number of subnodes of the node 75
that is 5 (...a_children.length), but its not what i am looking for i want to know
the number of all the subnodes(grandchild + son)
of node 75 (that equals to the last subnode number).

thanks you for your time please respond to me.
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 3/28/2006 at 08:56 AM Reply With Quote

I'm not sure I understand what you want, but maybe following code could help you out:

o_item = o_root.o_selected;
alert(o_item.n_id); //say 78
o_lastchild = o_item.a_children[o_item.a_children.length-1];
alert(o_lastchild.n_id)
View User's Profile View All Posts By User U2U Member
bird
Junior Member

Posts: 7
Registered: 2/14/2006
Member Is Offline
posted on 3/30/2006 at 07:50 AM Reply With Quote

hi rock,

thank you for replying to me, i was looking for a way to open the tree ,after adding a node to it, in the same way before.
so, i needed to know the place in tree where i put the node. ( every node has subnodes -childes and we add new one at the last place in the node)....
In fact i found a way to know this place by loop throw the childs until i get different n_depth . thank you for your solution it seem more Suitable.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos:
Frames targeting
Win help style
Free Download Free Download
Free Download Menu Builders
Online Builder
Product Documentation Documentation:
Documenation Page
Support Forum Technical Support
Support Forum
   

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004