html tables, columns and javascript
While writing a little javascript today I needed to dynamically add or remove columns from a table based on user input. Well I see there is a insertRow to add a new row, fair enough, but no equivalent function appeared available to add a column.
Anyway I found a solution quick enough at http://www.mredkj.com/tutorials/tableaddcolumn.html
It basically involves iterating the rows in the table (or table section), and calling insertCell for each row.
Thanks to Keith Jenci for the tutorial.