Forum Moderators: open
First set: Medium Pizza - $8.00
<input id="r1" value="1" name="RadioGroup" type="radio" checked>
</br>
Large Pizza - $10.00
<input id="r2" value="2" name="RadioGroup" type="radio">
</br></br>
Second set: Pick-Up
<input id="r1" value="1" name="RadioGroup" type="radio" checked>
</br>
Delivery - $3.00
<input id="r2" value="2" name="RadioGroup" type="radio">
</br></br>
Sorry for the pizza examples, that is just what my project is. Anyway, I need to get these in two different sets, currently only ONE of these four can be active at a time. Any help would be much appreciated.
formname.RadioGroup[0].value = 1
formname.RadioGroup[1].value = 2
formname.RadioGroup2[0].value = 1
formname.RadioGroup2[1].value = 2
Or use document.getElementById:
document.getElementById('r1').value=1
document.getElementById('r2').value=2
Note that you can only have a single id'ed element per page - in your first example you have both r1 and r2 ID'ed twice. Change the second group id's to r3 and r4.