Hide show layers with PHP?
Moderator: General Moderators
Hide show layers with PHP?
Is it possible to hide and show layers with PHP?
- EvilWalrus
- Site Admin
- Posts: 209
- Joined: Thu Apr 18, 2002 3:21 pm
- Location: Springmont, PA USA
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>