Currently, I have a JavaScript function in place that operates in the following manner. Upon clicking any row within the table, it leads to a new page at the link indicated on line 6. (The ID# from column 0 is appended to the end of the link). While this function works flawlessly, I am now looking for it to disregard clicks made in the last cell of each row. My goal is to insert another link in that final cell, and even with this function active, have it redirect to the link on line 6 while ignoring the link in the last cell of the row. The count starts at 2 due to the presence of the table header. How can I adjust the function so that it does not react to clicks in the last cell of every row?
function adjustedRowHandlers(){
var rows = document.getElementById("mytable").rows;
for (i = 2; i < rows.length; i++){
rows[i].onclick = function(){return function(){
var id = this.cells[0].innerHTML;
window.open("https://sitelink/" + id + ";", "Details", "top=150, left=500,height=757, width=900");
};}(rows[i]);}}
window.onload = adjustedRowHandlers();