NEWBIE - Button to hide a column in an HTML table

  • Thread starter Thread starter RockNRoll
  • Start date Start date
R

RockNRoll

Greetings,

I have a button on my page that, when clicked, I would like to hide a column
in an HTML table (or change the width of that column to 0px).

Is this possible? Can you please tell me how I can accomplish this?

Thanks,
-Dave
 
It is possible, you can access the table through dhtml and set the display style to none

Some example code
var SPANcoll = document.getElementsByTagName ("TD")

for (LC=0; LC < SPANcoll.length; LC++)

{

if (SPANcoll[LC].className == ColName)

{

SPANcoll[LC].style.display = hidden;

}

}
 
Back
Top