[thelist] dynamically hiding table rows?

Jay Blanchard jblanchard at pocket.com
Fri Jun 1 08:14:42 CDT 2007


[snip]
possibly this is a stupid question, nevertheless: In an application
we're currently building, I'm about to try to dynamically hide table
rows using JavaScript and switching "style.display" between "block" and
"none". This works fine so far, except for one problem: As soon as I
make a table row "disappear" setting display to "none", all of its
content vanishes (good) but leaves a white empty space in my table
where the disabled row used to be (bad). Not sure whether my approach
is too naive to actually do that, but it doesn't seem all that bad. Can
anyone point me where to peek to not just make the table row content
disappear but also the "empty" space it leaves around, right now?
[/snip]

Having just tried this a couple of weeks ago I think I can help. I had
to separate my table content into separate tables (I was hiding/showing
several rows at a time) and the only effective way was to hide each
table. Part of this is because a table is a block level element, a table
row is not.



More information about the thelist mailing list