|
Mailing Lists
|
Home / Groups / Javascript
Need help to repeat dynamicly form fields onclickI have a form with 4+ input fields. I need these 4+ fields to be repeated every time the user clicks "Add Additional Topic(s)" Can someone please help me with the JS function on that? <script> function addTopicEvent() { var x = document.getElementById('meeting_topics'); do I use the innerHTML here? or appendChild() how do i make it work, whats the syntax? } </script> <!--- Repeat the div meeting_topics section every time the user clicks on 'Add Additional Topic' ---> <div id="meeting_topics"> <tr><td> </td></tr> <tr> <td><font color="red">* </font>Meeting Topic:</td><td><cfinput type="text" size="58" name="meeting_topic"></td> </tr> <tr> <td>Presenter(s):</td><td><cfinput type="text" size="58" name="meeting_presenters"></td> </tr> etc.... </div> <tr> <td align="left" colspan="2"><a href="javascript:;" onclick="addTopicEvent();">Add Additional Topic(s)</a></td> </tr> |
February 12, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||