Override onclick event in javascript/jquery
<p>I have a table(3 td's) with onclick event and need different onclick event for one td.</p>

<pre><code>    &lt;table onclick="window.location.href='http://www.google.com?id=12345'"&gt;
    &lt;tr&gt;
    &lt;td&gt;text&lt;/div&gt;
    &lt;td&gt;text1&lt;/div&gt;
    &lt;td onclick="favTheater('test')"&gt;text3&lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;

    &lt;script type="text/javascript"&gt;
          function favTheater(msg){
            var e = window.event;
            e.stopPropagation();
            e.preventDefault();
            window.location.href="http://www.yahoo.co.in?msg=msg";
        }
    &lt;/script&gt;
</code></pre>

<p>I need to override table <code>onclick</code> and need to function <code>favTheater('test')</code> 
Note: table in loop and each id and msg will change.
Please help me on this.</p>
