[Javascript] table collapse bug in IE6?

Roger Roelofs rer at datacompusa.com
Fri Mar 26 14:18:15 CST 2004


Paul,

I have successfully used display:none; in a situation like this.  In my 
case I had a css class predefined and I just set the className in my 
javascript code.

On Mar 26, 2004, at 3:05 PM, Paul Novitski wrote:

> 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