dynamic table issue in Firefox

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pinson.nick@gmail.com

    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:



    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.


  • GArlington

    #2
    Re: dynamic table issue in Firefox

    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...

    Comment

    • pinson.jenny@gmail.com

      #3
      Re: dynamic table issue in Firefox

      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.

      Comment

      Working...