I have this Javascript function which "alerts" the content of a clicked cell, wherever I click on my HTML array :
var table = document.getElementById("tableID");
if (table != null) {
for (var i = 0; i < table.rows.length; i++) {
for (var j = 0; j < table.rows[i].cells.length; j++)
table.rows[i].cells[j].onclick = function () {tableText(this);};
}
}
function tableText(tableCell) {alert(tableCell.innerHTML);}
My goal is returning only the value of the first cell of the clicked row (I've tried to manage it but I'm a newbie in Javascript...). Thanks in advance !