I am tasked with changing the color of a specific table row based on user interaction. The table consists of multiple rows, each containing a button or image. When the user clicks on one of these buttons or images, a popup appears. Upon successful data submission within the popup, the color of the row where the interaction occurred should change. All elements in the table, including rows and cells, are already assigned IDs and style classes.
To accomplish this, I have attempted several methods:
1.
window.opener.document.getElementById('rowId'+lineNumber).style.backgroundColor="#00FF00";
2.
window.opener.document.getElementById('rowId'+lineNumber).className="innerrowcss";
3.
var tbl = window.opener.document.getElementById('linesTableId');
tbl.rows[lineNumber].style.backgroundColor="#00FF00";
or
tbl.rows[lineNumber].style.className="innerrowcss";
Unfortunately, none of the above approaches have been successful in changing the color of the desired row. I would greatly appreciate any assistance in achieving this functionality.
Thank you, Eshwari