[Javascript] table collapse bug in IE6?

Flavio Gomes flavio at economisa.com.br
Fri Mar 26 13:10:54 CST 2004


if (bRowIsSelected)
{
oRow.style.display = "block";
}else{
oRow.style.display = "none";
}
----- Original Message ----- 
From: "Paul Novitski" <paul at dandemutande.org>
To: "[JavaScript List]" <javascript at LaTech.edu>
Sent: Friday, March 26, 2004 5:05 PM
Subject: [Javascript] table collapse bug in IE6?


> I've run into a pesky problem with an application I'm writing that's
> dedicated to IE6:
>
> I download a dataset to the browser as a table, then allow the user to
> select record subsets.  My Javascript record-selection function hides or
> unhides table rows; basically:
>
> if (bRowIsSelected)
> {
> oRow.style.visibility = "visible";
> oRow.style.position = "static";
> }else{
> oRow.style.visibility = "hidden";
> oRow.style.position = "absolute";
> }
>
> I found that merely setting row visibility to hidden doesn't hide the rows
> -- they still take up space in my table, showing up as gray bands.  I have
> to set position to absolute to make them truly disappear so the table will
> collapse properly.  (Using visibility:collapse doesn't change this.)
>
> However, doing so left fragmentary grey ghosts of cell borders on the
> screen when they disappeared.  I've hidden the cells within hidden rows as
> well, but I'm still getting some border ghosting.
>
> Worse, when some rows are hidden and the table rearranges column widths
> naturally to accommodate the current content, fragments of borders are
left
> scattered within the table area where the side borders of hidden cells
once
> were.
>
> I'm tired of hacking at this, and am resorting to removing, then
completely
> rebuilding, my display table each time a record selection is made.  But
the
> problem bugs me because collapsing tables would be such an elegant
> solution.  Has anyone encountered this problem and found a reliable
> solution or workaround?
>
> Thanks,
> Paul
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>




More information about the Javascript mailing list