Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: onclick event

  1. #1
    Regular Coder
    Join Date
    May 2004
    Posts
    391
    Thanks
    76
    Thanked 0 Times in 0 Posts

    onclick event

    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>

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    625
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you just want to show it:

    Code:
    <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
    "God so loved the world that he gave his only begotten son, so that whosoever believed in him would not perish, but have everlasting life. For God did not send his son into the world to condemn the world, but so that through him the world might be saved. "


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •