Try the following code
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript">
function showHide(obj) {
if(obj.innerHTML == 'Hide') {
document.getElementById('tab1').style.display = 'none';
obj.innerHTML = 'Show';
return false;
}
else {
document.getElementById('tab1').style.display = 'block';
obj.innerHTML = 'Hide';
return true;
}
}
</script>
</head>
<body>
<table cellpadding='0' cellspacing='0' width='200' border='1' id='tab1'>
<tr><td>Testing</td></tr>
</table>
<a href="javascript: void(0)" onclick="showHide(this);" >Hide</a>
</body>
</html>
I haven't entered much inside the table just for the testing entered some misc data.
Bookmarks