...

View Full Version : onclick event



nikko50
10-30-2004, 06:51 PM
How can I call the below with an onclick event..

<div style="z-index: 2; position: absolute; left: 610px; top: 155px; background-color: yellow; width: 100px; padding: 10px; border: red 2px dashed;">And yet another layer goes above the main content. <p>Notice the tasteful border.</p></div>

jamescover
10-31-2004, 01:05 AM
If you just want to show it:


<div id="oDiv" style="display:none;z-index:2;position:absolute;left:610px;top:155px;background-color:yellow;width:100px;padding:10px;border:red 2px dashed;">And yet another layer goes above the main content. <p>Notice the tasteful border.</p></div>

<a href="#" onclick="document.getElementById('oDiv').style.display='';">Show</a>

If you want to toggle it, post back.



-james



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum