I've written a piece function that is supposed to delete a particular row in table based on the id of that row. For some reason beyond my comprehension the below code deletes multiple rows from my table but not the one I am interested in deleting. Why is this? What am I missing?
Code:
function deleteRows(obj)
{
for (var i = 0; i <= obj.rows.length; i++)
{
if (obj.rows[i].getAttribute("id") == "acc_date");
obj.deleteRow(i);
}
}