title: Javascript to disable or enable radio buttons
body: <p>I'm trying to do something a bit more complicated than this, but I broke it down and threw it in <code>JSFIDDLE</code> and I still can't get it to work.</p>
  
  <p>Any suggestions?</p>
  
  <p><a href="http://jsfiddle.net/9XYb4/" rel="nofollow" title="http://jsfiddle.net/9XYb4/">JSFiddle</a></p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;label for="service-type"&gt;Value&lt;/label&gt;
  &lt;select id="service-type" onChange="hamburger()"&gt;
    &lt;option&gt;0&lt;/option&gt;
    &lt;option&gt;1&lt;/option&gt;
    &lt;option&gt;2&lt;/option&gt;
    &lt;option&gt;3&lt;/option&gt;
  &lt;/select&gt;
  &lt;label for="receiptNo"&gt;No&lt;/label&gt;
  &lt;input type="radio" name="receipt" id="receiptNo"&gt;
  &lt;label for="receiptYes"&gt;Yes&lt;/label&gt;
  &lt;input type="radio" name="receipt" id="receiptYes"&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>var e = document.getElementById("service-type");
  var ServiceUser = e.options[e.selectedIndex].text;
  
  function hamburger() {
     if (ServiceUser.value === "2") {
        document.getElementById("receiptNo").disabled = true;
        document.getElementById("receiptYes").checked = true; 
       } 
  }
  </code></pre>