addEventListener() not working ?
var mytable = document.getElementById('GridTable');
for (var r = 0; r <rows; r++)
{
var row = mytable.insertRow(r);
for (var c = 0; c <cols; c++)
{
var cell=row.insertCell(c);
cell.id='td'+nn;
//alert(cell.id);
cell.innerHTML=' ';
cell.className="dynamic";
cell.addEventListener("click", function() {bcolor1('red',cell.id);});
nn++;
}
}
bcolor1('red',cell.id)is missing.