468,292 Members | 1,493 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,292 developers. It's quick & easy.

Dynamically How to Add a Node in Javascript Tree view

i am using a java script to create a tree view in my html page.

i got that script from this link :
http://destroydrop.com/javascripts/tree/

given script is static script creations for tree view,but i want to add a new node on that tree.

i select a node location in a dropdown control(nodes present in a tree will appear in this control).
i will give the new node name in a text box control.
when i press a button in my html page

i have to add that new node on the specified location in that tree.

Thanks in Advance
Dec 19 '07 #1
1 4187
gits
5,390 Expert Mod 4TB
hmm ..

it is difficult to say something without knowing your code ... do yo have the references to the nodes in the tree? if so ... you could use the appendChild() or insertBefore() dom-methods to insert the new node into the tree ... may be you could extend the tree's add() method for a simpler use ... so you could append next to the currently selected node ... but may be the current add() method is enough?

kind regards
Dec 20 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Ryan Stewart | last post: by
3 posts views Thread by Saradhi | last post: by
1 post views Thread by happy.john1234 | last post: by
1 post views Thread by Richard Harter | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.