Modify JavaScript to exclude first column from opening new page
<p>I have a html table with data. I use this JavaScript to open new page when I click on a table row:</p>

<pre><code>function addOnclickToDatatableRows() {
                //gets all the generated rows in the html table
                var trs = document.getElementById('form:dataTable').getElementsByTagName('tbody')[0]
                .getElementsByTagName('tr');
                //on every row, add onclick function (this is what you're looking for)
                for (var i = 0; trs.length &gt; i; i++) {
                    trs[i].onclick = new Function("rowOnclick(this)");
                }
            }

            function rowOnclick(tr) {
                var elements = tr.cells[0].childNodes;
                for(var i = 0; elements.length &gt; i; i++) {
                    if ((typeof elements[i].id !== "undefined") &amp;amp;&amp;amp;
                    (elements[i].id.indexOf("lnkHidden") &gt; -1)) {
                        //opne in a new window//  window.open(elements[i].href);
                        location.href=elements[i].href
                        break;
                    }
                }
                return false;
            }
</code></pre>

<p>How I can modify the script to exclude the first column when I click on a row. On the first column of the table I have checkboxes which I don't want to click and open a new page</p>

<p>Best wishes</p>
