G
GarryJones
I am trying to hide text inside <tr> and <td> tags until a link is
clicked.
The following code example reveals the hidden text before the link is
clicked. Can anyone point me in the right direction so I can prevent
this? Note that this code works if the table, tr and td tags are
removed (but this is only an exert of code and I need to get this to
work within a table).
<script type="text/javascript" language="JavaScript">
function showtest1() {
document.getElementById("test1").style.display = "inline";
}
</script>
<table>
<div>
<tr><td>
<a href="javascript:showtest1();" onClick="return true;">
Click here to see hidden text</a>
</td></tr>
</div>
<div id="test1" style="display: none" >
<tr><td>Hidden text</td></tr>
</div>
</table>
Any help greatly appreciated
Garry Jones
Sweden
clicked.
The following code example reveals the hidden text before the link is
clicked. Can anyone point me in the right direction so I can prevent
this? Note that this code works if the table, tr and td tags are
removed (but this is only an exert of code and I need to get this to
work within a table).
<script type="text/javascript" language="JavaScript">
function showtest1() {
document.getElementById("test1").style.display = "inline";
}
</script>
<table>
<div>
<tr><td>
<a href="javascript:showtest1();" onClick="return true;">
Click here to see hidden text</a>
</td></tr>
</div>
<div id="test1" style="display: none" >
<tr><td>Hidden text</td></tr>
</div>
</table>
Any help greatly appreciated
Garry Jones
Sweden