create a javascript function that reads the dropdown list to display a radio button

Please modify to suit your need when you retrieve data in your classic ASP script:

function kick1()
{

var e = document.getElementById("post");
var strPost = e.value;

if (strPost=="Cook")
{  
 document.getElementById("TT1").checked=true;
}

if (strPost=="Manager")
{  
document.getElementById('TT2').checked=true;
}

if (strPost=="")
{
document.getElementById('TT1').checked=false;
document.getElementById('TT2').checked=false;

}

}
<select onchange='javascript:kick1();' id=post>
<option value="">Please select
<option value="Manager">Manager
<option value="Cook">Cook
</select>
<br>

<input type=radio name=newtype id=TT1 value='H'>Hourly
<input type=radio name=newtype id=TT2 value='S'>Salary

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top