text field required...

wxdqz

New Member
Hello-
I have group of four radio buttons, if the last radio button (other) is chosen I need the text field to ba required. If one of the other radio buttons is chosen then the text field is not required. Can anyone get me started. I've tried several things to the following script but it isn't working:

<!-- Begin

function runFunction()
{
var radios = document.formname.F1
for( x=0; x < radios.length; x++)
if( radios[x].checked) {
var selectedRadio = radios[x].value;
//test it
alert(selectedRadio);
}
}


if(selectedRadio == "other") {
//perform the manditory condition
}
// End -->

Thanks!
 
Back
Top