title: Input Radio Groups Matching on Different Tables
body: <p>I have two set of <code>&lt;input type="radio" /&gt;</code> button groups that are on the same html page but in different <code>&lt;td&gt;</code>s. When the user chooses one from either set I want the other set to have the one selected and give the same value. </p>
  
  <p>Example: If the user selected 1 on group with the name <code>VT2</code>, and then the user changes(Autopostback) to the other table that <code>&lt;input type="radio" /&gt;</code> button group with name <code>VT22</code> will have the same <code>&lt;input type="radio" /&gt;</code> button checked and giving the same value.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;td&gt;
    &lt;label&gt;&lt;input type="radio" name="VT2" value="1" checked /&gt;1&lt;/label&gt;
    &lt;label&gt;&lt;input type="radio" name="VT2" value="1"/&gt;2&lt;/label&gt;&amp;nbsp;
    &lt;label&gt;&lt;input type="radio" name="VT2" value="1"/&gt;3&lt;/label&gt;&amp;nbsp;
  &lt;/td&gt;
  &lt;td&gt;
    &lt;label&gt;&lt;input type="radio" name="VT22" value="1" checked /&gt;1&lt;/label&gt;
    &lt;label&gt;&lt;input type="radio" name="VT22" value="1"/&gt;2&lt;/label&gt;&amp;nbsp;
    &lt;label&gt;&lt;input type="radio" name="VT22" value="1"/&gt;3&lt;/label&gt;&amp;nbsp;
  &lt;/td&gt;
  </code></pre>
  
  <p>This is what I have for JavaScript but I have tried many things and cannot figure out what to do. </p>
  
  <pre><code>$(document).ready(function () {
      var vt2 = document.getElementsByName("VT2");
      var vt22 = document.getElementsByName("VT22");
  
      for (i = 0; i &lt; vt2.length; i++) {
          if (vt2.length &gt; 0){
  
          } else if (vt22.length &gt; 0){
  
          }
      }
  });
  </code></pre>