Javascript and visibility question

The follwing code works great if the field in question is a dialog list. How could I get this to work with a radio button field. Thanks for your help.

el = document.getElementById(‘nexthide’).style

if (this.options[this.selectedIndex].text == “Stress Echo”) {

el.visibility = ‘visible’

}else {

el.visibility = ‘hidden’

}

Subject: Javascript and visibility question

for(x=0; x < fieldname.length; x++){

if (fieldname.value=“Stress Echo”){

el.visibility = ‘visible’;

break;

}else {

el.visibility = ‘hidden’

}

Subject: RE: Javascript and visibility question

for(x=0; x < fieldname.length; x++){

if (fieldname.checked==true){

  if(fildname[x].value=="Stress Echo"){

      el.visibility = 'visible';

      break;}

   }

else{

el.visibility = 'hidden';}

}

Subject: RE: Javascript and visibility question

I said radio button, but mean a checkbox. Sorry. Can you help with this. Thanks.

Subject: RE: Javascript and visibility question

I would suggest to surround the field with a or

then display or hide the that. Whatever is inside will be hidden or visible, so it would handle RS, CB or single text field all the same.