Use the checked property:
checkboxes:
if (checkbox.checked)
alert("seelcted");
else
alert("not selected");
radio buttons:
function getRadioSelection(radioObject) {
var value = null;
for (var i=0; i<radioObject.length; i++) {
if (radioObject[i].checked) {
value = radioObject[i].value;
break;
}
}
return value;
}
HTH
Phil
> Hi all
>
>
> Can anyone tell how to find out which radio button a user has checked
> out of
> the options without submitting the forms. The same answer is also
> required
> for checkboxes.
>
> thnx
>
> Bharat