Manick Solutions

Software and database, design and development.

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.

Posted in Uncategorized by admin on May 23rd, 2008 at 9:57 pm.

Add a comment

 

No Replies

Feel free to leave a reply using the form below!


Leave a Reply