Javascript error, updating checkboxes/buttons base don result of other checkboxes
<p>first a quick description: </p>

<p>I have 4 tables (1 and 3 contain a line of checkboxes, 2 and 4 contain radio buttons).</p>

<p>What I am looking to do is have it so that when I select a checkbox in table 1, it updates tables 2,3,4 by setting the equivalent checkbox to 'disabled'.</p>

<p>I figure the easiest option is to use the 'VALUE' attribute, as this will be the same on each table (e.g. the field with VALUE 4 on the first table will be the equivalent of the field with VALUE 4 on the others).</p>

<p>My tables all have a unique ID per table, and share a classname of 'TableClassName'. 
They all look similar to:</p>

<pre><code>&lt;table id="TableID1" class="TableClassName"&gt;
&lt;tr&gt;
&lt;th class="CellGrey"&gt;1&lt;/td&gt;
&lt;th class="CellGrey "&gt;2&lt;/td&gt;
&lt;th class="CellGrey "&gt;3&lt;/td&gt;
&lt;th class="CellGrey "&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="CellRed "&gt;&lt;INPUT TYPE="checkbox" NAME="ignore[]" VALUE="1" checked&gt;&lt;/td&gt;
&lt;td class="CellWhite "&gt;&lt;INPUT TYPE="checkbox" NAME="ignore[]" VALUE="2"&gt;&lt;/td&gt;
&lt;td class="CellWhite "&gt;&lt;INPUT TYPE="checkbox" NAME="ignore[]" VALUE="3"&gt;&lt;/td&gt;
&lt;td class="CellWhite "&gt;&lt;INPUT TYPE="checkbox" NAME="ignore[]" VALUE="4"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>So far what I have is:</p>

<pre><code>script type="text/javascript"&gt;
$(document).ready(function()
{
$("#TableID1").on('click','input:checkbox',function()
        { 
            if ($(this).attr('checked')) 
                {
                var $val = $(this).attr('value');
                //alert($val);
                $(".DBSelectTable td").function()
                    {
                        if ($(this).child().attr('VALUE') == $val)
                            {
                                $(this).child().attr('disabled');
                            } 
                    }

            }       
        }
    )
}       
);
&lt;/script&gt;
</code></pre>

<p>But, I am getting the error:</p>

<blockquote>
  <p>"Uncaught Type Error: Object[object Object] has no method 'function' "</p>
</blockquote>

<p>my theory is simple:</p>

<ol>
<li><p>Select the #TableID1 table</p></li>
<li><p>find out which box in the first table has been clicked and get the VALUE attribute</p></li>
<li><p>Select the .TableClassName tables</p></li>
<li><p>check if any have the same VALUE, and add the 'disabled' attribute</p></li>
</ol>

<p>but something is wrong, and I can't see where to go from here. Any help would be appreciated. </p>
