The first line returns array !
So you are appending to array not to TD, even less to ALL TD-s.

aidi[0].appendChild(b);

That would probably do something, to fill all TD-s,you have to get everything into loop.

felgall

12-07-2012, 01:37 AM

Why are you using createElement to create the rows and cells rather than using inserRow() and insertCell() to add the rows and cells to your table?

The way you are doing not only involves lots more typing but the code also runs a lot slower in most browsers. Using the table methods for table manipulation results in much sorter earier to maintain code.

See http://javascriptexample.net/domtable12.php for an example of the simplest way to create a table using JavaScript

Sscorpius

12-08-2012, 10:25 AM

I know you're right, flegall, but i don't really want to start all over again now. I don't want a very performant code; if it works, that's a good start for me.

Meanwhile, i modified the addDelete() function and it looks like this: