hi,
i am trying to set a value of a text box to the value of the radio button when radio button is click. below is what i am trying to do:
<script type="text/JavaScript" >
function SetValue(of, to)
{
if (document.getElementById(of) != null && document.getElementById(to) != null)
{
document.getElementById(of).value = document.getElementById(to).value;
}
}
</script>
<input id="rb1" name="rb1" onclick="SetValue('tb1', 'rb1');" type="radio" value="color" />
i am trying to set a value of a text box to the value of the radio button when radio button is click. below is what i am trying to do:
<script type="text/JavaScript" >
function SetValue(of, to)
{
if (document.getElementById(of) != null && document.getElementById(to) != null)
{
document.getElementById(of).value = document.getElementById(to).value;
}
}
</script>
<input id="rb1" name="rb1" onclick="SetValue('tb1', 'rb1');" type="radio" value="color" />