Hi all,
I am trying to create quiz dynamically. I want user to add more and more ques in a quiz and then finally submit the form. Here is a code that I am trying

<div align="center">
<table id=repeat>
<tr>
<td width="155"><font color="#FF9933">Question</font></td>
<td width="377" align="left">
<p align="center"><textarea rows="4" name="S1" cols="41"></textarea></td>
</tr>
<tr>
<td width="155"><font color="#FF9933">Correct Answer</font></td>
<td width="377" align="left"><font color="#FF9933">Option</font></td>
</tr>
<tr>
<td width="155" align="left">
<input type="radio" value="V1" name="R1[]1" checked></td>
<td width="377" align="left"><font color="#FFFFFF"> 
<input size="48" maxlength="50" style="float: left" name="QTitle2"></font></td>
</tr>
<tr>
<td width="155" align="left">
<input type="radio" value="V1" name="R1[]2" checked></td>
<td width="377" align="left"><font color="#FFFFFF">
<input size="48" maxlength="50" style="float: left" name="QTitle3"></font></td>
</tr><tr>
<td width="155" align="left">
<input type="radio" value="V1" name="R1[]3" checked></td>
<td width="377" align="left"><font color="#FFFFFF"> 
<input size="48" maxlength="50" style="float: left" name="QTitle4"></font></td>
</tr>
<tr>
<td width="155" align="left">
<input type="radio" value="V1" name="R1[]" checked></td>
<td width="377" align="left"><font color="#FFFFFF">
<input size="48" maxlength="50" style="float: left" name="QTitle1"></font></td>
</tr>
</table>
</div>
<p align="center">Add more questions&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					Submit this Quiz&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					Cancel </p>

If the user clicks the "Add more questions" then same form fields should get appended.
If user clicks "Submit this Quiz" then full form should get submitted.

Please guide me in this.

Thanks

JavaScript is not JSP (Java Server Pages). Moving to correct forum section

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.