473,581 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ 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 2503
On Mar 31, 4:03 am, "pinson.n...@gm ail.com" <pinson.n...@gm ail.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...@tis cali.co.ukwrote :
On Mar 31, 4:03 am, "pinson.n...@gm ail.com" <pinson.n...@gm ail.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
10704
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 displays correctly in standards compiance mode in firefox, but not msie, where the padding is added on to the column widths. the table size is always...
2
2572
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 7.51, even though it displays fine in Mozilla 1.6, Firefox 0.9, Netscape 7.1 and Internet Explorer 6.0 Hope someone can help!
2
8719
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 window to generate the tables. The basic idea is to add a table tag, with a thead and tbody, on the main parent page, that has display:none set....
18
30473
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 dynamic. I have added a filtering mechanism (in javascript) that can be used to hide unneeded rows. However, each time I hide or show rows, the column...
117
18463
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 elements in the HTML to get everything just right. When you consider the class attribute on the DIV elements, there's not much size savings anymore...
9
2937
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 got the core of the javascript from here: http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm I noticed in the demo that sometimes the...
1
2696
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 din't work. what is not supported on Firefox? the javascript syntax? please help as i am not familiar with javascript. thanks in advanced. this is...
6
1945
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 the php script from the browser using Ajax, the list is created fine in IE and Opera but on Firefox and safari I got the following error: ...
19
2278
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 be as tall as needed to fill the page. This works fine in firefox but not in ie. Here is a link to the page if you would like to see it ...
0
7882
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8312
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7914
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5683
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5366
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3809
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3835
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1410
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1145
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.