Revision: 53080
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 12, 2011 17:06 by richtt
Initial Code
<script type="text/javascript">
<!--
function switchView(obj) {
var el = document.getElementById(obj);
if ( el.style.display != "none" ) {
el.style.display = 'none';
}
else {
el.style.display = '';
}
}
//-->
</script>
<table>
<tr>
<td width="30%" align="right" valign="top"><a href="##GotoMyControlName" onClick="switchView('MyControlName'); return false;">My Heading Text:</a></td>
<td width="1%"> </td>
<td>
<!-- BEGIN section of page that will toggle between show/hide by clicking link in cell above. -->
<div id="MyControlName" style="display:none">
<table border="0" cellpadding="3" cellspacing="0" >
<tr >
<td><span class="cPreReq">MyOUTPUTgoesHere</span> </td>
</tr>
</table>
</div>
<!-- END section of page that will toggle between show/hide -->
</td>
</tr>
</table>
Initial URL
http://www.codekeep.net/JavaScript/code/snippets/20287/Show-Hide-table-data/view.aspx
Initial Description
Show Hide table data uses href, anchors, div tags, and javascript to toggle between showing and hiding a table on the html page.
Initial Title
Show Hide table data
Initial Tags
javascript, html
Initial Language
JavaScript