Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] visibility of a table column
- From: Liam.Rice at autodata.net (Liam Rice)
- Subject: [Javascript] visibility of a table column
- Date: Tue Oct 10 16:24:17 2006
Sounds like you are trying to remove the column from the page. I did this one time and found that I had to make the columns into separate tables within the columns, making it possible to hide just that one table cell. But I think the property you are looking for is display, rather than visibility. -----Original Message----- From: javascript-bounces@xxxxxxxxxx [mailto:javascript-bounces@xxxxxxxxxx] On Behalf Of John Deighan Sent: Tuesday, October 10, 2006 4:10 PM To: javascript@xxxxxxxxxx Subject: [Javascript] visibility of a table column I need to set the visibility of an entire column to hidden or visible. I was hoping that the following would work: <table> <colgroup> <col id="col1"> ... </colgroup> .... </table> <button onclick="document.getElementById('col1').style.visibility = 'hidden';"> Hide Column 1 </button> However, when I try it, it doesn't work. Is it supposed to? I realize that I can set the visibility of all cells in that column, but it might be a very large table. I am using Firefox. Actually, while composing this e-mail, I decided to try this under IE 6. It sort of works. It hides the contents of the cells in that column. However, it doesn't make the column go away - in fact, the column retains its former width, so I assume it's computing that width from the data, which is still really there. To be honest, this seems like an odd solution, since it's the column's visibility that I'm setting, not the content of the column's cells. Does anyone know what the behaviour is supposed to be? _______________________________________________ Javascript mailing list Javascript@xxxxxxxxxx https://lists.LaTech.edu/mailman/listinfo/javascript
- References:
- [Javascript] visibility of a table column
- From: John Deighan
- [Javascript] visibility of a table column
- Prev by Date: [Javascript] visibility of a table column
- Next by Date: [Javascript] unsuscribe
- Previous by thread: [Javascript] visibility of a table column
- Next by thread: [Javascript] visibility of a table column
- Index(es):