[thelist] re: checkboxes, DOM, rows, etc

Fernando Gómez fgomez at criba.edu.ar
Thu Sep 19 17:31:01 CDT 2002

> But..won't this only get me one row each time I add? I need to add
> multiple rows..but replacing it..unless I misunderstand, will always
> give me one table with one row?


I think this simplified code shows clearly the structure you need:

<tbody id="theTableBody">
<!-- initial row here -->

function addRow(someText) {
  var newRow = document.createElement("TR");
  var newCell = document.createElement("TD");
  var newText = document.createTextNode(someText);

No need to replace children, no need no append tables; it just appends new
rows to the TBODY. And all of them live inside the form. Does it work? I
hope so! :)

Fernando Gómez

More information about the thelist mailing list