title: Uncheck a checkbox when another checkbox is checked
body: <p>I have trouble to create a script that deselect a chebock when the other on the same line is selected</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>        function uncheck1(){
              document.getElementById("check1").checked = true;
              document.getElementById("check2").checked = false;
              document.getElementById("select").disabled = true;
          }
          function uncheck2(){
              document.getElementById("check1").checked = false;
              document.getElementById("check2").checked = true;
              document.getElementById("select").disabled = false;
          }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;form name="form" action="action.php" method="post"&gt;
    &lt;table&gt;
      &lt;tr&gt;
        &lt;td&gt;
          &lt;input type="hidden" value="Carrizo J." name="player[]" /&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;label&gt;Carrizo J.&lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;input id="check1" onclick="uncheck1()" type="checkbox" name="titolare[]" value="0" checked="" /&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;input id="check2" onclick="uncheck2()" type="checkbox" name="titolare[]" value="1" /&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;select id="select" name="ordine[]" disabled&gt;
            &lt;option&gt;1&lt;/option&gt;
            &lt;option&gt;2&lt;/option&gt;
          &lt;/select&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;
          &lt;input type="hidden" value="Handanovic S." name="player[]" /&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;label&gt;Handanovic S.&lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;input id="check1" onclick="uncheck1()" type="checkbox" name="titolare[]" value="0" checked="" /&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;input id="check2" onclick="uncheck2()" type="checkbox" name="titolare[]" value="1" /&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;select id="select" name="ordine[]" disabled&gt;
            &lt;option&gt;1&lt;/option&gt;
            &lt;option&gt;2&lt;/option&gt;
          &lt;/select&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;-&lt;/td&gt;
        &lt;td&gt;-&lt;/td&gt;
        &lt;td&gt;-&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;-&lt;/td&gt;
        &lt;td&gt;-&lt;/td&gt;
        &lt;td&gt;-&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><img src="https://i.stack.imgur.com/udvAQ.png" alt="This is the final result"></p>
  
  <p>As well as, obviusly, it works only the first line.
  If I check the right one, the left one is unchecked and the select is enabled.
  Then if I check the left one, the right one is unchecked and select is disabled.</p>
  
  <p>Is there a way to be able to do the same things to other 24 lines, without having to write 2 functions for each?</p>