naqvia
Member
Posts: 13
Registered: 4/12/2007
Location: USA
Member Is Offline
|
| posted on 4/12/2007 at 09:13 PM |
|
|
Form/checkbox
Hi,
I pretty much want a checkbox after each (or some) of the nodes and perform an action. So I need to make a form. Is this possible? How do I do this?
Thanks!
|
|
|
tigra
Administrator
Posts: 1960
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 4/13/2007 at 04:47 AM |
|
|
You can either insert the <input type="checkbox"> into the text of the tree items or modify the script to adding the checkboxes to the HTML
generated by the tree. If you want us to do the job please submit a support ticket for the quote.
|
|
|
naqvia
Member
Posts: 13
Registered: 4/12/2007
Location: USA
Member Is Offline
|
| posted on 4/13/2007 at 04:16 PM |
|
|
And what about a form.. like I want a submit button and reset button.. ? I added the checkboxes (through html) and when tree produces.. and you check
boxes they don't get checked!.. the whole thing get selected.. here is where im running my tree: http://methylome.salk.edu/ttmenu/demo1/index2.html. Thanks
|
|
|
tigra
Administrator
Posts: 1960
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 4/13/2007 at 04:38 PM |
|
|
Well, I guess you'll need to take plan B. <a ..> around checkbox blocks the access to it. In some browsers it may be ok, but reliable solution
calls for HTML change in the tree.js
|
|
|
naqvia
Member
Posts: 13
Registered: 4/12/2007
Location: USA
Member Is Offline
|
| posted on 4/13/2007 at 05:31 PM |
|
|
Can you help me with that? How?
|
|
|
tigra
Administrator
Posts: 1960
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 4/13/2007 at 07:52 PM |
|
|
in line 122 of tree.js you can add add a cell to the table:
</td></tr></table>
replace with
</td><td><input type="checkbox"></td></tr></table>
add attributes to the input field as needed for example
</td><td><input type="checkbox" name="cb' + this.n_id+ '"></td></tr></table>
will create the unique names for all checkboxes cb0, cb1 ... etc.
|
|
|