Skip to content Skip to sidebar Skip to footer

Duplication Of Rows In Javascript Table

I am quite new to javascript and for some time now i cant figure a solution to a problem that i have on my own. The web application i am building is using javavascript and Firebase

Solution 1:

You only append data to the existing table, without ever removing existing rows in the table:

var row = tblUsers.insertRow(rowIndex);

You should make sure to remove all existing rows before adding the new one(s):

for (var i = tblUsers.rows.length; i >= 0; i--) {
    tblUsers.deleteRow(i - 1);
}

Post a Comment for "Duplication Of Rows In Javascript Table"