title: How do I enable/disable a textbox when a radio button is clicked using javascript?
body: <p>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.</p>
  
  <p>Here is my code below:    </p>
  
  <pre><code>&lt;INPUT TYPE="radio" name="type" id="type1"&gt;
  &lt;input type="text" name="name" value="&lt;?php echo $name?&gt;" onChange="javascript:enableField();"/&gt;
  </code></pre>