My aim is to produce some buttons that when clicked on change the style in which the page is displayed. For instance I have a table with id's in the <td>'s:
<table>
<tr>
<td id="one">aaaa</td>
<td id="two">bbbb</td>
<td id="three">cccc</td>
<td id="four">dddd</td>
</tr>
</table>
I also have a stylesheet that refers to these ids eg
<style>
#one{visibility:hidden};
#two{visibility:hidden};
#three{visibility:hidden};
#four{visibility:hidden}
</style>
There are then 4 buttons to give the user a choice of what table cells to display. So for example if the user clicks on button 1 the style #one becomes #one{visibility:visible}. I have looked at having the styles in <style> tags within the page and also as a selection of 4 CSS documents with the appropriate CSS being brought up according the button clicked. I have not been successful with either method though as I am having trouble working out how to change the style or stylesheet when the button is clicked.
If anyone has any ideas how to do this it would be appreciated.
<table>
<tr>
<td id="one">aaaa</td>
<td id="two">bbbb</td>
<td id="three">cccc</td>
<td id="four">dddd</td>
</tr>
</table>
I also have a stylesheet that refers to these ids eg
<style>
#one{visibility:hidden};
#two{visibility:hidden};
#three{visibility:hidden};
#four{visibility:hidden}
</style>
There are then 4 buttons to give the user a choice of what table cells to display. So for example if the user clicks on button 1 the style #one becomes #one{visibility:visible}. I have looked at having the styles in <style> tags within the page and also as a selection of 4 CSS documents with the appropriate CSS being brought up according the button clicked. I have not been successful with either method though as I am having trouble working out how to change the style or stylesheet when the button is clicked.
If anyone has any ideas how to do this it would be appreciated.