• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Firefox problem when showing/hiding table rows

 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have run into some weird behaviour on Firefox.

I am hiding/showing table rows based on the radio button clicked by the user.
Everything works fine, except in one particular case, when the display for one of the rows gets distorted.

And the problem only appears in Firefox (tested on 1.5.* and 2 beta), and at least not on the latest versions of IE, Opera and Konqueror (ver. 3.4.2).

The following code is the most I could simplify my original code to, I tried to make the row names as explanatory as possible.
Click the radio box named 'R2,3,5 (Not OK)' to see the buggy behaviour.

I observed a couple of peculiar things -

1. On resizing the browser a fraction, the display is corrected.
2. If a row is made visible after the problematic row, the display stays ok. (Click on R5,6 (OK) to see this)

So, I am inclined to believe that this might be a bug in page rendering by the browser.
I would, of course, be happy to be proven wrong

For now, my work around is to add another row with the max no. of columns used and set its visibility to 'hidden', and that solution is working fine.
I would love to hear of a better suggestion though.

Cheers,
Sonny

P.S. Please remove the <remove_this> text in JavaScript event handlers (on<remove_this>load)



[EDIT - fixed formatting of the code block - Sonny]
[EDIT - fixed code according to Eric's advice - Sonny]
[EDIT - Tested OK on Konqueror - Sonny]
[ August 14, 2006: Message edited by: Sonny Gill ]
[ August 14, 2006: Message edited by: Sonny Gill ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To get table-row to work, do the following:


Eric
 
Sonny Gill
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric,

Great tip, Thanks. I am using that now.

But, the original problem described in my post is still the same...any ideas on that?

I am hoping to get an opinion from people more experienced with JS/DOM, before I go through the trouble of downloading Mozilla nightly build and trying to reproduce the bug on that.

Cheers.

- Sonny
 
Sonny Gill
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Fixed code to include Eric' advice, tested on konqueror, and bumped up
reply
    Bookmark Topic Watch Topic
  • New Topic