I have multiple tables and I have a function that add rows to these tables:
<table id="table1" style=" border-collapse: collapse;">
<tr id="table1row1">...
<tr id="table1row2">...
<table id="table2" style=" border-collapse: collapse;">
<tr id="table2row1">...
<tr id="table2row2">...
The problem is that when I add rows instead of giving the result above I will have these kind of results:
<table id="table1" style=" border-collapse: collapse;">
<tr id="table1row1">...
<tr id="table1row2">...
<table id="table2" style=" border-collapse: collapse;">
<tr id="table2row1">...
<tr id="table2row3">...
when I call the function to add a row to a different table it just increment the value
var thischannel=1;
var thisassignment=1;
var thisrow=1;
function addRow(list,table){
thisrow++;
if(something to place in this to point if this is a new table or the same table){
var thisrow=1;
}
}