Web Analytics Made Easy -
StatCounter Very simple reveal code - CodingForum

Announcement

Collapse
No announcement yet.

Very simple reveal code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Very simple reveal code

    Hello,

    How can i reveal the contents in a div on clicking a link, like...

    Code:
    <a href="#">Click Here</a> to send a message..
    
    <br><br>
    
    <div id="hidden">
    contact form here, reveals on cick of the above link
    </div>
    PHP Code:
    $aString is_string((string)array()) ? true false// true :D 
    [/CENTER]

  • #2
    Try this:-


    Code:
    <a href="#" onclick = "showMessageBox()">Click Here</a> to send a message..
    <br><br>
    
    <textarea id = "messageBox" rows = "4" cols = "25" style="visibility:hidden" >Contact form here, reveals on click of the above link</textarea>
    
    [B]OR[/B]
    
    <div id = "messageBox" rows = "4" cols = "25" style="visibility:hidden" >Contact form here, reveals on click of the above link</div>
    
    
    <script type = "text/javascript">
    function showMessageBox() {
    document.getElementById("messageBox").style.visibility = "visible";
    }
    </script>

    Quizmaster: What "U" is a South American country whose capital city is Montevideo?
    Contestant: Uganda.
    Last edited by Philip M; Apr 3, 2009, 03:38 AM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

    Comment

    Working...
    X