Showing / Hiding a DIV is very easy. The following function should be inserted just before the end body tag on your page.
<script language="javascript" type="text/javascript">
function showhide(ID){
var tmp = document.getElementById(ID);
if (tmp.style.display=='none'){
tmp.style.display = '';
}else{
tmp.style.display = 'none';
}
}
</script>
The following function can then be called to toggle the divs display status:
<div id="helloworld">Hello World</div>
<div onclick="showhide('helloworld');">Show / Hide</div>
Hope this helps you out
Copyright PHPTutorials.co © 2009 - 2010