button to make layer visible in css

windows

Guest
i currently am testing a code...<br />
<br />
<html><br />
<head><br />
<style type="text/css"><br />
#layer1 {position:absolute; top:50; left:150; z-Index:0; visibility:hidden}<br />
#layer2 {position:absolute; top:70; left:200; z-Index:1}<br />
</style><br />
<br />
<body><br />
<div ID="layer1"><br />
<table border="1" bgcolor="#FFCC00"><tr><td>THIS IS LAYER 1<br>POSITIONED AT 100,100</td></tr></table><br />
</div><br />
<br />
<div ID="layer2"><br />
<table border="1" bgcolor="#00CCFF"><tr><td>THIS IS LAYER 2<br>POSITIONED AT 140,140</td></tr></table><br />
</div><br />
</body><br />
</html><br />
<br />
-is it possible to have a button that will make layer 1 visible when pressed? if yes, can somebody explain to me how to do this... i assume you can only do it by using javascript?! if there is another way though, please tell me how...<br />
<br />
cheers,<br />
daniel<!--content-->To hide element:<button onclick="document.getElementById('layer1').style.visibility='hidden'">Hide Element</button>just change 'hidden' to 'visible' to show it.<br />
<br />
Dr. Script<!--content-->cheers! everything works just the way i want it to! :D<!--content-->Cool Glad to help out :)<!--content-->
 
Back
Top