...

View Full Version : show/hide table with a click



extremed
11-19-2010, 06:02 AM
Hi

i want to hide a table when user click on a link

this is my code looks like


<div id="sh">
<table width="800" border="0">
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>

<div align="center"><a href="JavaScript:window.print();"><img src="images/print.png" alt="Print this page"/></a></div>

is it possible to hide above table at same time print this link clicked?

any help would be great


sorry for language errors

Regards.

Philip M
11-19-2010, 08:35 AM
<div align="center"><a href="JavaScript:window.print()"; onclick = "document.getElementById('sh').style.display='none';"><img src="images/print.png" alt="Print this page"/></a></div>


You may also use style.visibility = "hidden" if you wish the element being hidden to still occupy its same place in the layout of the page.


All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

extremed
11-19-2010, 09:18 AM
thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum