Hi. I need to insert a button with a variable id. For example, there is a loop that will create several buttons in the panel.
In my script, I have a line like:
var table=document.getElementById("data-table");
var newRow = table.insertRow(length);
.
.
var cell3 = newRow.insertCell(2);
cell3Content = document.createTextNode("< input type="button" value="Edit" class="edit" id='edit-button"+i+"' >");
cell3.innerHTML = cell3Content;
Where the i
that is in the id
of the button is variable I get an error when I run the extension. But when I remove this variable, everyting seems fine. What am I missing?