Results 1 to 3 of 3

Thread: Switch Content Script doesn't work for tables in Firefox 1.03

  1. #1
    Join Date
    Jun 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Switch Content Script doesn't work for tables in Firefox 1.03

    The attached file contains an example html page that should illustrate the problem.

    In FF 1.03 the hide/redisplay functions create an ever expanding space. Also the table structure seems to get screwed up.

    The last section of the example is the table structure without any script tags. This renders correctly in IE and FF.

    There are no problems in IE.

    Thanks

    Tom

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You cannot expand and contract a table row in FF like that. If you put a division or another table in a table cell and expand and contract that division or table, that will work in FF.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1
    You cannot expand and contract a table row in FF like that.
    Not in the way the script does it, no. However, you certainly can manipulate the display property to the desired effect.

    The problem is that the script assigns the value, 'block', to the display property. Whilst this is fine for block-level elements, it is not for table rows and other similar elements which do not take this value (table rows, for example, have the value, 'table-row', in CSS 2).

    The solution is not to assign any values other than 'none' to the display property. Instead, you assign an empty string. You can see this in the collapsible section code I wrote recently.

    Whilst the shifting that occurs in Firefox could be considered a bug on its part, the fact that 'block' is unconditionally assigned is a bug on the script's part.

    If the script is updated, it fix this problem then one of two other alterations will be necessary.

    1. If the script continues to initially hide content using a document-wide style sheet, then display property look-ups will need to be performed using the getComputedStyle method (or IE's equivalent, the currentStyle object).
    2. If property look-ups continue to be performed using the inline style object, then content will need to be hidden using that same object like I do in collapsible section.
    Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •