Hide show layers with PHP?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MattSharp
Forum Commoner
Posts: 62
Joined: Wed Apr 24, 2002 2:25 pm

Hide show layers with PHP?

Post by MattSharp »

Is it possible to hide and show layers with PHP?
User avatar
EvilWalrus
Site Admin
Posts: 209
Joined: Thu Apr 18, 2002 3:21 pm
Location: Springmont, PA USA

Post by EvilWalrus »

javascript and DHTML... php is static and server side, while javascript and dhtml is client side...
User avatar
hex
Forum Commoner
Posts: 92
Joined: Sat Apr 20, 2002 3:20 am
Location: UK

Post by hex »

Code: Select all

<script language="javascript" type="text/javascript">
<!--

function blocking(nr) &#123;
 if (document.getElementById) &#123;
  current = (document.getElementById(nr).style.display == 'block') ? 'none' : 'block';
  document.getElementById(nr).style.display = current;
 &#125;
 else if (document.all) &#123;
  current = (document.all&#1111;nr].style.display == 'block') ? 'none' : 'block'
  document.all&#1111;nr].style.display = current;
 &#125;
 else alert ('This link does not work in your browser.');
&#125;

// -->
</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>
Post Reply