Forum Moderators: open
Any insight would be appreciated, thank you...
var isChecked = false;
var radios = document.getElementsByTagName("myRadioButtons");
for (var i=0;i<radios.length;i++) {
if (radios[i].checked) isChecked = true;
}
Checkboxes are only a little more dificult. You can do the same thing as above, but you'd need a way of creating an array of all your checkboxes. If your form's not dynamic, you can just hardcode them. Otherwise, you might want to put them in a span or other element with a special ID and load your array with
document.getElementById("mySpanForCheckboxes").childNodes.