[Javascript] (no subject)

Hassan Schroeder hassan at webtuitive.com
Mon Aug 27 17:58:16 CDT 2007


lists at jdpill.com wrote:

> That being the case, if I want to insert two rows into the table, using
> javascript, how could I do that within the bounds of valid HTML? One of
> two code options is inserted by the js - one option having one row, the
> second having two...? by inserting two rows (which will have rows before
> and after), I'm going to have to have the div overlapping the cells and
> rows at some point?

The point is you shouldn't be using a DIV here at all; it doesn't
belong in a table.

Either insert your innerHTML into a TR, or insert an entire row
into a TBODY, which is probably better if you have a situation of
possible multiple row insertions.

Or add it via DOM and skip the innerHTML entirely... :-)

-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                            dream.  code.




More information about the Javascript mailing list