I have this below function in my project:-
function RowSelection() {
var table = document.getElementById("tbl_Audit");
if (table != null) {
for (var x = 0; x < table.rows.length; x++) {
for (var j = 0; j < table.rows[x].cells.length; j++) {
if (j = 4) {
alert("condition passed " + j)
table.rows[x].cells[j].onclick = function() {
tableText(this);
}
}
}
}
}
}
when this function is triggered it goes into a never ending loop. Can anybody please help me identify what I am doing wrong here.
=is assignment,==and===are comparison