title: javascript enable disable radio button on click and select only one at a time
body: <p>I am trying to do this.</p>
  
  <p>I have 3 radio buttons,</p>
  
  <ol>
  <li>If click on a radio and it's set, next time i click on it. It should
  be unchecked/rest.</li>
  </ol>
  
  <p>I want to do in standard javascript without jquery as can't have that at the moment.</p>
  
  <p>Here's my code so far.</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
   &lt;head&gt;
    &lt;title&gt; New Document &lt;/title&gt;  
    &lt;meta name="Author" content=""&gt;
    &lt;meta name="Keywords" content=""&gt;
    &lt;meta name="Description" content=""&gt;
  
    &lt;script type="text/javascript"&gt;
  
     function toggle(radioBtn)
     {
       if(radioBtn.checked)
       {
         radioBtn.checked = false;
       }
       else
       {
        radioBtn.checked = true;
       }
  
  
       // only select one at a time.
  
     }
  
    &lt;/script&gt;
   &lt;/head&gt;
  
   &lt;body&gt;
   &lt;form id="myForm" name="myForm"&gt;
    &lt;input type="radio" name="radioBtn" id="radioBtn1"    value="A" onClick="toggle(this);" /&gt;
  &lt;input type="radio" name="radioBtn" id="radioBtn1"    value="B" onClick="toggle(this);"/&gt;
  &lt;input type="radio" name="radioBtn" id="radioBtn1"    value="C" onClick="toggle(this);"/&gt;
  &lt;/form&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Please help. Your help will be appreciated.
  Thanks</p>