Hi I needed some help adding radio button values.
<form name="analysis" id="analysis" action="index2.php" method="POST" onsubmit="return validateme()">
<table width="50%">
<h5><strong>A=Never B=Mild (twice a week or Less) C=Moderate (3 - 6 times a week) D=Severe (daily Symptoms)</strong></h5>
<td><b>SECTION 1</b>
<td align="right">
A B C D
<tr class="question">
<td>1. sec11
<td align="right">
<input name="sec11" id="sec11" value="0" onclick="ADD(this.value)" type="radio">
<input name="sec11" id="sec11" value="2" onclick="ADD(this.value)" type="radio">
<input name="sec11" id="sec11" value="5" onclick="ADD(this.value)" type="radio">
<input name="sec11" id="sec11" value="10" onclick="ADD(this.value)" type="radio">
<tr class="question">
<td>2. sec12
<td align="right">
<input name="sec12" id="sec12" value="0" onclick="ADD(this.value)" type="radio">
<input name="sec12" id="sec12" value="2" onclick="ADD(this.value)" type="radio">
<input name="sec12" id="sec12" value="5" onclick="ADD(this.value)" type="radio">
<input name="sec12" id="sec12" value="10" onclick="ADD(this.value)" type="radio">
<tr class="question">
<td>3. sec13
<td align="right">
<input name="sec13" id="sec13" value="0" onclick="ADD(this.value)" type="radio">
<input name="sec13" id="sec13" value="2" onclick="ADD(this.value)" type="radio">
<input name="sec13" id="sec13" value="5" onclick="ADD(this.value)" type="radio">
<input name="sec13" id="sec13" value="10" onclick="ADD(this.value)" type="radio">
<tr>
<td>
<td align="right"><input type="hidden" name="SecTotal1" id="sectotal1" value="" maxlength="5" size="5" class="textbox">
</table>
<table width="50%">
<h5><strong>A=Never B=Mild (twice a week or Less) C=Moderate (3 - 6 times a week) D=Severe (daily Symptoms)</strong></h5>
<td><b>SECTION 2</b>
<td align="right">
A B C D
<tr class="question">
<td>4. sec21
<td align="right">
<input type="radio" name="sec21" id="sec21" value="0" onclick="ADD(this.value)">
<input type="radio" name="sec21" id="sec21" value="2" onclick="ADD(this.value)">
<input type="radio" name="sec21" id="sec21" value="5" onclick="ADD(this.value)">
<input type="radio" name="sec21" id="sec21" value="10" onclick="ADD(this.value)">
<tr class="question">
<td>5. sec22
<td align="right">
<input name="sec22" id="sec22" value="0" onclick="ADD(this.value)" type="radio">
<input name="sec22" id="sec22" value="2" onclick="ADD(this.value)" type="radio">
<input name="sec22" id="sec22" value="5" onclick="ADD(this.value)" type="radio">
<input name="sec22" id="sec22" value="10" onclick="ADD(this.value)" type="radio">
<tr class="question">
<td>5. sec23
<td align="right">
<input name="sec23" id="sec23" value="0" onclick="ADD(this.value)" type="radio">
<input name="sec23" id="sec23" value="2" onclick="ADD(this.value)" type="radio">
<input name="sec23" id="sec23" value="5" onclick="ADD(this.value)" type="radio">
<input name="sec23" id="sec23" value="10" onclick="ADD(this.value)" type="radio">
<tr>
<td>
<td align="right"><input type="hidden" name="SecTotal2" id="sectotal2" value="" maxlength="5" size="5" class="textbox">
</table>
</form>
I tried many javascripts to write ADD functions but couldnt do it,
I want to add the radio button value and store it ni the hidden SecTotal field at the end… any idea how it can be done??