Hide show layers with PHP?
Posted: Sat Apr 27, 2002 10:34 pm
Is it possible to hide and show layers with PHP?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<script language="javascript" type="text/javascript">
<!--
function blocking(nr) {
if (document.getElementById) {
current = (document.getElementById(nr).style.display == 'block') ? 'none' : 'block';
document.getElementById(nr).style.display = current;
}
else if (document.all) {
current = (document.allїnr].style.display == 'block') ? 'none' : 'block'
document.allїnr].style.display = current;
}
else alert ('This link does not work in your browser.');
}
// -->
</script>
<div id="theLayer">This is the layer to show (or hide)</div>
<div id="layer2" style="display: none">This is a layer that starts hidden</div>
<a href="#" onClick="blocking('theLayer')">Show/Hide</a>