473,473 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2494
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steve Sabljak | last post by:
I seem to having a little trouble getting a table to display correctly in both msie and firefox. I want to set the table and column widths in pixels, and have some cell padding too. The table...
2
by: Martin Doyle | last post by:
Ok, I'm building a JS-based limitless-sublevel dynamic menu and am making it cross browser as well - 3 packs of aspirin so far and counting ;) I'm having a weird rendering problem using Opera...
2
by: The_Original_MB | last post by:
I have a task to create tables dynamically, using the javascript DOM. The current method uses a 1px x 1px IFRAME to loop through some data generation stuff, and then call JS functions in the parent...
18
by: chimalus | last post by:
I am using a table with no column widths specified, letting the table layout manager do its thing for figuring out the column widths, and this works just fine. Now I want to make the table...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
9
by: pbd22 | last post by:
Hi. This is just a disaster management question. I am using XMLHTTP for the dynamic loading of content in a very crucial area of my web site. Same as an IFrame, but using XMLHTTP and a DIV. I...
1
by: SunshineInTheRain | last post by:
The following code is dynamic create dropdownmenu which data within pulled from database However, the code work well on IE but not on Firefox. On Firefox, the whole mouseover and mouseout function...
6
by: raknin | last post by:
I am creating a dynamic list on the server using php file,when I run the PHP script in all 4 browsers (IE 6, Firefox 2, opera and safari 3) every think go Ok and the list is created. but when I call...
19
by: Rabel | last post by:
I have a page that is using tables (please no comments about this - I understand it should be css but firefox created this template) I have a menu down the left side and the bottom is supposed to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.