I have an initial table that shows all the products, when I double click on the table it opens a window where I am trying to add new rows in the table, but this table is called by a file in js, to which the window is floating
I tried to use it initially:
var table = document.getElementsByTagName('table')[0];
but this causes it to add in the first table where it has all the products.
what I intend is in the table that I opened in the window, so I defined an id for the table, and tested as follows: