Categories | Question details Back To List | ||
Embedded HTML inside DHTML Tree control.. I have a requirement where in I am am using the DHTMLX tree component to display some properties. The child (leaf) nodes in the tree will basically be HTML components (like text box, radio button, option box) The user will actually enter some values or make some selection in the child nodes. (inputting text or selecting some option) I would like to know that when I finally submit the page, will I be able to retrieve values of the leaf nodes..? I will be using XML to populate the tree control. a typical XML will look like <?xml version="1.0" encoding="iso-8859-1"?> <tree id="0" radio="1"> <item open="1" text="<font color='red'>Books</font>" id="books" im0="tombs.gif" im1="tombs.gif" im2="iconSafe.gif" call="1" select="1"> <item text="Mystery Thrillers" id="mystery" open="1"> <item id="lb"> <itemtext><![CDATA[<input type="text" name="Test1" />]]></itemtext> <itemtext><![CDATA[<input type="radio" name="Test2" />]]></itemtext> <item text="All the Flowers Are Dying" id="lb_1" /> <item text="The Burglar on the Prowl" id="lb_2" /> <item text="The Plot Thickens" id="lb_3" /> <item text="Grifter's Game" id="lb_4" /> <item text="The Burglar Who Thought He Was Bogart" id="lb_5" /> </item> </item> </item> </tree> Imp thing is that all the child nodes will have a check box present Do I need to make any changes in my JS file.... to read this XML along with embedded HTML component back...? Thanks Abhijeet Answer posted by Support on May 15, 2008 04:21 >>I would like to know that when I finally submit the page, will I be able to retrieve values of the leaf nodes..?
The component will render input defined in such way as normal HTML inputs, so if you will have tree inside a FORM tag and will submit such form in any native ways - values from tree controls will be available as part of normal form submit. >>Imp thing is that all the child nodes will have a check box present The native checkboxes of tree will not be included in form submit, to submit such data you will need to add some custom code <form onsubmit="this.checkboxes=tree.getAllChecked()"> <input type="hidden" name="checkboxes"> >>Do I need to make any changes in my JS file.... to read this XML along with embedded HTML component dhtmlxTree supports any HTML value as content of tree item - so you need not modify the code to support such XML syntax |