Search HouseOfScripts.com

 

All Scripts        JavaScripts        ASP Scripts        Other Scripts

 

  Disable Radio Buttons according to the selected Radio Button asp, send, email, cdonts, link, recordset, hyper, hyperlink, create, list, box, dependant, dynamic

Based on the code Disable buttons according to the selected radio button, I created the following script:

1. In the HEAD of the document:

<SCRIPT LANGUAGE="JavaScript">

function Disab (val) {
if(val=="1")
{form1.gr11[0].disabled=false;
form1.gr11[1].disabled=false;
form1.gr12[0].disabled=true;form1.gr12[0].checked=false;
form1.gr12[1].disabled=true;form1.gr12[1].checked=false}
if(val=="2")
{form1.gr11[0].disabled=true;form1.gr11[0].checked=false;
form1.gr11[1].disabled=true;form1.gr11[1].checked=false;
form1.gr12[0].disabled=false;
form1.gr12[1].disabled=false}
}
</SCRIPT>

2. In the BODY:

<form name="form1" method="post" action="">
<input type="radio" name="gr1" value="Yes" onClick="Disab
(1)">
<input type="radio" name="gr11" value="Yes" disabled>
<input type="radio" name="gr11" value="No" disabled>
<BR><BR>
<input type="radio" name="gr1" value="No" onClick="Disab
(2)">
<input type="radio" name="gr12" value="Yes" disabled>
<input type="radio" name="gr12" value="No" disabled>
</form>

 

 


Home       Scripts       Active WebTools       Web Templates       Forum       Tools        Hosting       Questions/Comments       Add/Request