I have the a FORM for rearranging some records (number of records is dynamic).
The code for the Form is :
<Form name='RearrangeSectionForm' Method='POST' Action='includes/updateSectionOrder.asp' onsubmit='return checkRadios(this);'>
<table width='90%' align='left'>
<tr><td width='20%' align='center' valign='top'><b>Current Order</b></td>
<td width='30%' align='center' valign='top'><b>Section Name</b></td>
<td width='50%' align='center' valign='top'><b>Desired Order</b></td></tr>
<tr><td width='20%' align='center' valign='top'><b> </b></td>
<td width='30%' align='center' valign='top'><b> </b></td><td width='50%' align='center' valign='top'><b> 1 2 3 </b></td></tr>
<tr><td width='20%' align='center' valign='top'>1</td>
<td width='30%' align='center' valign='top'>sec1</td>
<td width='50%' align='center' valign='top'>
<input type='radio' value='1' name='R1' ID='Radio1'>
<input type='radio' value='2' name='R1' ID='Radio1'>
<input type='radio' value='3' name='R1' ID='Radio1'>
</td></tr>
<tr><td width='20%' align='center' valign='top'>2</td>
<td width='30%' align='center' valign='top'>sec 2</td>
<td width='50%' align='center' valign='top'>
<input type='radio' value='1' name='R2' ID='Radio2'>
<input type='radio' value='2' name='R2' ID='Radio2'>
<input type='radio' value='3' name='R2' ID='Radio2'>
</td></tr>
<tr><td width='20%' align='center' valign='top'>3</td>
<td width='30%' align='center' valign='top'>sec 3</td>
<td width='50%' align='center' valign='top'>
<input type='radio' value='1' name='R3' ID='Radio3'>
<input type='radio' value='2' name='R3' ID='Radio3'>
<input type='radio' value='3' name='R3' ID='Radio3'>
</td></tr>
<tr><td width='20%'></td><td width='30%'></td><td width='50%' align='center' valign='top'><br><br><input type='submit' value='Update Section Order' name='Save'></td></tr></table></Form>
I have some validation code to make sure that atleast one radio button is checked in each radio group.
I need to validate that only one radio button is checked in each radio group having the same order( or value). (i.e., if Radio group R1 is checked and has a value of 2, then R2 and R3 should not have any radio button checked with value =2. Please remember that the set of Radio buttons is dynamic but will always have the same number of rows and columns.
Any help will be greatly appreciated.
Thank you.
PKS.
The code for the Form is :
<Form name='RearrangeSectionForm' Method='POST' Action='includes/updateSectionOrder.asp' onsubmit='return checkRadios(this);'>
<table width='90%' align='left'>
<tr><td width='20%' align='center' valign='top'><b>Current Order</b></td>
<td width='30%' align='center' valign='top'><b>Section Name</b></td>
<td width='50%' align='center' valign='top'><b>Desired Order</b></td></tr>
<tr><td width='20%' align='center' valign='top'><b> </b></td>
<td width='30%' align='center' valign='top'><b> </b></td><td width='50%' align='center' valign='top'><b> 1 2 3 </b></td></tr>
<tr><td width='20%' align='center' valign='top'>1</td>
<td width='30%' align='center' valign='top'>sec1</td>
<td width='50%' align='center' valign='top'>
<input type='radio' value='1' name='R1' ID='Radio1'>
<input type='radio' value='2' name='R1' ID='Radio1'>
<input type='radio' value='3' name='R1' ID='Radio1'>
</td></tr>
<tr><td width='20%' align='center' valign='top'>2</td>
<td width='30%' align='center' valign='top'>sec 2</td>
<td width='50%' align='center' valign='top'>
<input type='radio' value='1' name='R2' ID='Radio2'>
<input type='radio' value='2' name='R2' ID='Radio2'>
<input type='radio' value='3' name='R2' ID='Radio2'>
</td></tr>
<tr><td width='20%' align='center' valign='top'>3</td>
<td width='30%' align='center' valign='top'>sec 3</td>
<td width='50%' align='center' valign='top'>
<input type='radio' value='1' name='R3' ID='Radio3'>
<input type='radio' value='2' name='R3' ID='Radio3'>
<input type='radio' value='3' name='R3' ID='Radio3'>
</td></tr>
<tr><td width='20%'></td><td width='30%'></td><td width='50%' align='center' valign='top'><br><br><input type='submit' value='Update Section Order' name='Save'></td></tr></table></Form>
I have some validation code to make sure that atleast one radio button is checked in each radio group.
I need to validate that only one radio button is checked in each radio group having the same order( or value). (i.e., if Radio group R1 is checked and has a value of 2, then R2 and R3 should not have any radio button checked with value =2. Please remember that the set of Radio buttons is dynamic but will always have the same number of rows and columns.
Any help will be greatly appreciated.
Thank you.
PKS.