Does anybody know how to show & hide a <td> or <tr> or is it done some other way??
I want to be able to hide information in a lower part of a table then have an image/hyperlink that will hide or show it.
d'you catch my drift??
thanks in advance
Printable View
Does anybody know how to show & hide a <td> or <tr> or is it done some other way??
I want to be able to hide information in a lower part of a table then have an image/hyperlink that will hide or show it.
d'you catch my drift??
thanks in advance
you can try this, don't know if it work!!
<table>
<tr>
<td id="test">dsfdsfdf</td>
</tr>
<table>
<input type=button onClick="document.all['test'].style.visibility='hidden';" value="hide cell">
let me know if it works!!
It sort 'of works but the <td> that your hiding doesn't shrink.
The idea is to have a table with 10+ rows, rows 2 - 5 are hidden, so when I click on a Image/Hyperlink rows 2 - 5 will toggle their visibility and pull row 6 underneath row 1
Similar to the functionality in a treeview control
Does that make any sense???
:(
well you will have to do it will layers i'm afraid,
!!
i don't think you do, check this out:
Code:<html>
<head>
<title>Test</title>
<head>
<body>
<table border="1">
<tr>
<td id="test">dsfdsfdf</td>
<td id="test2">asdfjkl;</td>
</tr>
<tr id="test3">
<td>dsfdsfdf(row2)</td>
<td>asdfjkl;(row2)</td>
</tr>
<table>
<input type=button onClick="document.all['test3'].style.display='block';" value="show cell">
<input type=button onClick="document.all['test3'].style.display='none';" value="hide cell">
</body>
</html>
Thanks gwdash :D Spot on!!