I have a radio button with a textbox. How do I enable/disable the textbox using the onclick event of a radio button? That is, if the radio button is selected then the textbox should be enabled or else disabled.
Here is my code below:
<INPUT TYPE="radio" name="type" id="type1">
<input type="text" name="name" value="<?php echo $name?>" onChange="javascript:enableField();"/>
1 Answer