Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
11-13-2006, 02:41 AM #1
- Join Date
- Aug 2006
- melbourne, aus
- Thanked 0 Times in 0 Posts
Dynamic tree, selected node sets form value
i'm after something similar to the yahoo dynamic tree
where i can have the selected leaf/node set a hidden value in a form
i don't think the yahoo one knows what is selected
also, similar to http://www.blueshoes.org/_bsJavascr...s/example8.html
but without the links, just purely selecting the node (not the radio button), and also free/open source
each node should have an id associated with it (this is selected from the database along with the text for the node (which i have already succeeded in doing, albeit very roughly))
eg. base node (id 1)
-- first child node (id 2)
-- second child node (id 3)
---- grandchild node (id 4)
-- third child node (id 5)
---- grandchild node (id 6)
------ great grandchild node (id 7)
---- grandchild node (id 8)
where for example, when "third child node" is selected, a hidden field will have its value set to "5", etc.
does anyone know of a ready-made script for this?
or a script that can be easily modified to do this?
11-14-2006, 08:53 AM #2
- Join Date
- Oct 2003
- on a ship
- Thanked 6 Times in 5 Posts
hrmmmm... not sure if this is what you are talking about what its worth a shot.....
put an onclick method on each node:
then in the function do as so:
//if your hidden input has an id do as so
//if the hidden input is in a form without an id but has a name do as so
I make no attempt at pretending like I'm a professional. I offer help with what knowledge I do have.