title: Disabling checkbox in IE7
body: <p>I have two checkboxes in a form and if the first checkbox is checked, the second should be enabled, and if the first is unchecked the second should be disabled. I made a quick function to handle this:</p>
  
  <pre><code>function toggleElement(sender, receiver)
  {
      var sendEl = document.getElementById(sender);
      var recEl = document.getElementById(receiver);
      if (sendEl.checked)
          recEl.disabled = false;
      else
          recEl.disabled = 'disabled';
  }
  </code></pre>
  
  <p>This works fine in FF and IE 8/9 but doesn't do anything in IE7, I added the following to see what was happening:</p>
  
  <pre><code>alert(receiver);
  alert(recEl);
  alert(recEl.disabled);
  </code></pre>
  
  <p>In the browsers that work (FF, IE8+) these alert 'name', '[object]', and 'true' if disabled 'false' if not. In IE7 the alerts are fired but say 'name', '[object]', and 'true' even though the checkbox is never disabled (it does not get greyed out and I can continue to click it)</p>
  
  <p>Any ideas why it isn't working in IE7?</p>