Disable Radios

[Total: 0    Average: 0/5]

You want to freeze the two radios in their actual position.

Body Code:

<form name="formname" valign="middle">
<input type=radio
       name=Radio
	   checked
	   value=no
	   onclick="fixRadios('formname.Radio[0]','formname.Radio[1]')">
unlocked&nbsp;&nbsp;&nbsp;
<input type=radio 
       name=Radio
	   value=yes
	   onclick="fixRadios('formname.Radio[0]','formname.Radio[1]')">
locked
</form>

<script>
function fixRadios(formName1,formName2) {
if (eval("document."+formName1+".checked")==1) {
eval("document."+formName1+".checked =   document."+formName1+".checked");                      
eval("document."+formName2+".checked =   document."+formName2+".checked");    
} else {
eval("document."+formName1+".checked =  ! document."+formName1+".checked");                      
eval("document."+formName2+".checked =  ! document."+formName2+".checked");          
}       
}
</script>  

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *