[Javascript] table collapse bug in IE6?
David Lovering
dlovering at gazos.com
Sat Mar 27 07:51:42 CST 2004
Hmmm... most interesting.
Rather than twinking about with the visibility of each div/row object, (which may leave the borders still showing), I'd suggest removing the rows completely which you don't want to have appear, and add them again when the selection criteria so indicates. I've done this on a production database-lookup utility I wrote a couple of years ago, and it works slick as snot.
The only consideration is that if you've got zillions of rows/columns to repaint, the rebuild of the ordered table may cause the screen image to sequentially mutate while the column widths change as new rows are inserted. To beat that problem, I start with a "show everything" display (much as you do), record the display column widths, and then force the column width attribute to conform to that initial value. That way the screen doesn't writhe about as things get repositioned. Believe me, having all the columns change width on every reselect looks incredibly shabby (unprofessional, etc. etc.), and this trick lets the original dynamic column widths define what the subsequent table redraws will use -- the best of both worlds.
The other trick which makes for a neater finished product is to have two layers -- one visible (with a message of the sort "please wait while we rebuild your table image..."), and a background plane where the new table is being rebuilt. When the onload event for the back plane object shows that the new table view is complete, simply change the z-attribute to bring the back plane to the fore (and vice-versa), and voila! the finished table reappears. A variation is to leave the original table in view and use a floating pop-up to alert the user that the new table is being constructed, and then swap the top table-layer with the bottom just after you trash the pop-up.
QED.
-- Dave Lovering
----- Original Message -----
From: Paul Novitski
To: [JavaScript List]
Sent: Friday, March 26, 2004 3:19 PM
Subject: Re: [Javascript] table collapse bug in IE6?
Thanks for your suggestions, however I had earlier tried display:none and
found the problem of border ghosts remains.
Attached is a demonstration of the problem. (Blush: this is an old
workbench file, not final production code, so please excuse all the wood
shavings, tools lying about, and old trials commented out in the mix.)
I imagine that this problem might not SHOW if I use fixed column widths to
prevent the cell borders from shifting horizontally as rows appear &
disappear. However, a) I want to solve the problem if I can, not just work
around it, and b) I balk at pre-determining table column widths -- I'll do
it if I have to for a specific purpose, such as matching a table cell with
a contained image of fixed dimensions, but in general it feels like
intruding on functionality I ought to leave up to the browser so that I
don't have to try to anticipate future data fill needs. The looser my
control on rendering niceties, the less I have to go back and tweak code as
conditions change.
Paul
------------------------------------------------------------------------------
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20040327/6ddfa09f/attachment.htm>
More information about the Javascript
mailing list