What method would be best to use to selectively set a single or multiple radio button(s) to a desired setting with JavaScript?
/**
* setCheckedValueOfRadioButtonGroup
* @param {html input type=radio} vRadioObj
* @param {the radiobutton with this value will be checked} vValue
*/
function setCheckedValueOfRadioButtonGroup(vRadioObj, vValue) {
var radios = document.getElementsByName(vRadioObj.name);
for (var j = 0; j < radios.length; j++) {
if (radios[j].value == vValue) {
radios[j].checked = true;
break;
}
}
}