469,307 Members | 2,597 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

dynamic table issue in Firefox

I've been playing around with dynamic tables for the last couple days
and have run into some interesting issues. I know how to work around
this issue, but was wondering if anyone had any insight as to why it's
happening in the first place:

I create table row and cell elements using a JS node creator and
append them to the table element. Cell attributes are set using JS as
well (setAttribute() method on the cell element objects). All is well
in Safari, but Firefox seems to get severely confused -- it doesn't
honor the rowspan attributes for the dynamically created cells that
contain them. Oddly, however, if I copy the generated HTML to a static
file, it renders fine.

You can see the results/differences in the following two files:
http://tiger3k.com/nick/project/flatten_new.html
http://tiger3k.com/nick/project/tabletest.html

I've tried appending the second row (the one without the rowspan)
first, and inserting the first row before it, with the same result. It
would appear firefox doesn't honor rowspan for dynamically created
table elements? Which seems odd -- it handles colspan with no issues.
Mar 31 '08 #1
2 2326
On Mar 31, 4:03 am, "pinson.n...@gmail.com" <pinson.n...@gmail.com>
wrote:
I've been playing around with dynamic tables for the last couple days
and have run into some interesting issues. I know how to work around
this issue, but was wondering if anyone had any insight as to why it's
happening in the first place:

I create table row and cell elements using a JS node creator and
append them to the table element. Cell attributes are set using JS as
well (setAttribute() method on the cell element objects). All is well
in Safari, but Firefox seems to get severely confused -- it doesn't
honor the rowspan attributes for the dynamically created cells that
contain them. Oddly, however, if I copy the generated HTML to a static
file, it renders fine.

You can see the results/differences in the following two files:http://tiger3k.com/nick/project/flat...tabletest.html

I've tried appending the second row (the one without the rowspan)
first, and inserting the first row before it, with the same result. It
would appear firefox doesn't honor rowspan for dynamically created
table elements? Which seems odd -- it handles colspan with no issues.
Change your javascript to add <tbodyelement to the table...
Mar 31 '08 #2
On Mar 31, 6:03 am, GArlington <garling...@tiscali.co.ukwrote:
On Mar 31, 4:03 am, "pinson.n...@gmail.com" <pinson.n...@gmail.com>
wrote:
I've been playing around with dynamic tables for the last couple days
and have run into some interesting issues. I know how to work around
this issue, but was wondering if anyone had any insight as to why it's
happening in the first place:
I create table row and cell elements using a JS node creator and
append them to the table element. Cell attributes are set using JS as
well (setAttribute() method on the cell element objects). All is well
in Safari, but Firefox seems to get severely confused -- it doesn't
honor the rowspan attributes for the dynamically created cells that
contain them. Oddly, however, if I copy the generated HTML to a static
file, it renders fine.
You can see the results/differences in the following two files:http://tiger3k.com/nick/project/flat...tiger3k.com/ni...
I've tried appending the second row (the one without the rowspan)
first, and inserting the first row before it, with the same result. It
would appear firefox doesn't honor rowspan for dynamically created
table elements? Which seems odd -- it handles colspan with no issues.

Change your javascript to add <tbodyelement to the table...
Beauty. Thanks. Worked like a charm.
Mar 31 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Steve Sabljak | last post: by
2 posts views Thread by Martin Doyle | last post: by
2 posts views Thread by The_Original_MB | last post: by
18 posts views Thread by chimalus | last post: by
117 posts views Thread by phil-news-nospam | last post: by
9 posts views Thread by pbd22 | last post: by
19 posts views Thread by Rabel | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.