title: Enable/disable all inputs and checkboxes with any checked checkbox
body: <p>I have a form with many text-input-fields and checkboxes. Whenever a checkbox is checked, all text-input fields and all other checkboxes (exept the one that was checked)  should be disabled. After unchecking this checkbox, all disabled fields should be enabled again. 
  This works with the following code (shown are only the first 3 lines):</p>
  
  <pre><code>&lt;form id="myForm"&gt;
  
      Checkbox 1: &lt;input type="checkbox" name="checkbox1" id="checkboxOne" onclick="enableDisableAll();" /&gt;
      &lt;input type="text" id="id1" name="name1" /&gt;&lt;br&gt;
  
      Checkbox 2: &lt;input type="checkbox" name="checkbox2" id="checkboxTwo" onclick="enableDisableAll();" /&gt;
      &lt;input type="text" id="id2" name="name2" /&gt;&lt;br&gt;
  
      Checkbox 3: &lt;input type="checkbox" name="checkbox3" id="checkboxThree" onclick="enableDisableAll();" /&gt;
      &lt;input type="text" id="id3" name="name3" /&gt;&lt;br&gt;
  
  &lt;/form&gt;
  
  
  function enableDisableAll() {
  
      cb1 = document.getElementById('checkboxOne').checked;
      cb2 = document.getElementById('checkboxTwo').checked;
      cb3 = document.getElementById('checkboxThree').checked;
  
  
      document.getElementById('checkboxOne').disabled = (cb2 || cb3);
      document.getElementById('id1').disabled = (cb1 || cb2 || cb3);
  
      document.getElementById('checkboxTwo').disabled = (cb1 || cb3);
      document.getElementById('id2').disabled = (cb1 || cb2 || cb3);
  
      document.getElementById('checkboxThree').disabled = (cb1 || cb2);
      document.getElementById('id3').disabled = (cb1 || cb2 || cb3);
  
  }
  </code></pre>
  
  <p>Since the code becomes confusing with many checkboxes (cb1 || cb2 || cb3 || ....... cb(n)), I wonder if there would be a more elegant possibility to do this, e.g.:</p>
  
  <p>function enableDisableAll() {</p>
  
  <pre><code>cb1 = document.getElementById('checkboxOne').checked;
  cb2 = document.getElementById('checkboxTwo').checked;
  cb3 = document.getElementById('checkboxThree').checked;
  
  var cb_array = [];
  
  cb_array.push("cb1");
  cb_array.push("cb2");
  
  var cb_array_imploded = cb_array.join(" || ");
  
  document.getElementById('id1').disabled = (cb_array_imploded);
  </code></pre>
  
  <p>Unfortunately, this does not work.</p>
  
  <p>Does anyone have a simple solution for my problem?</p>