Thomas said:
"style" refers to object, according to the W3C-DOM Level 2 Style
Specification, and the TD elements initial value for the CSS
"display" property is "table-cell", not "block".
According to the W3C-DOM Level 2 Style Specification, the <col> element
initial value for the CSS "display" property is "table-column", not
"block" and not "table-cell". Now, the subject line was about column in
table...
Thus it should
be
style.display = "none";
and
style.display = "table-cell";
Else it will only work in non-standards-compliant UAs, if that.
PointedEars
P.S.: Your "From" header is borken.
and if
style.display = "table-column";
does not work in MSIE 6 for Windows, then you can use
style.display = "block";
so that the code will work for roughly 60% of all web users out there
(that's just a little bit more than a few hundreds of millions of people
on this planet) ... until MSIE 7 for Windows correct all this.
According to
http://www.quirksmode.org/css/contents.html
and
http://www.quirksmode.org/css/display.html#table
display:table-column
is not supported by MSIE 5+ nor Mozilla 1.4.
Nevertheless, one can code to workaround all these difficulties. Here's
a page (local version without brinkster banner ads will validate
perfectly) which will work overall rather well in Mozilla 1.6, Opera
7.50 PR1 build 3494, MSIE 6 for Windows, K-meleon 0.8.2, NS 7.1,
Firebird 0.8+ (build 20040120), MyIE2 vers. 0.9.12 with Gecko 1.5:
http://www10.brinkster.com/doctorunclear/HTMLJavascriptCSS/TableColumnCollapse.html
Modifying the table column structure *and* the table row structure at
the same time will not produce correct layout. But if the user only
tries to modify either only the column structure or only the row
structure, then the layout will be correct. I still need to tweak the
code and tune a few things in the functions to make it more robust. I'm
still working on that file so I don't want to hear nitpicking comments.
I have another demo page where one can show, hide or collapse table
sections like the thead, tbody and tfoot.
Pointed ears, you could have replied in a much more constructive manner.
Again, you focus on little things which can only annoy others or
contribute/lead to clashing <plonk> noises.
DU