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 5 of 5
  1. #1
    New Coder
    Join Date
    Oct 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Click & show more ...

    Click & show more ...

    Don't know exactly how this is called ...

    but I want the following:

    when you click on 'SEE MORE' , I need my html page to show some text ... which can only be seen when you click that ... and also you need to be able to remove it again ...

    I'm sure this is to be found on Google but I just don't know the right name what to look for

  • #2
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    You can use divs where you want the text to be:

    First, place your function inside the head tag, inside the script tag:
    Code:
    <head>
    <script>
    function  displayText()
    {
     document.getElementById('Text').style.visibility = "visible";
    }
    </script>
    </head>
    And then in the body part:

    Code:
    <a href="javascript: displayText()">Show more </a>
    <div id="Text" style="visibility: hidden">
    Text Text Text Text Text Text Text Text Text Text Text Text
    </div>
    Last edited by BarrMan; 10-29-2006 at 07:18 PM.

  • #3
    New Coder
    Join Date
    Oct 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    nvm already found a dhtml way

  • #4
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    You need to learn manners :/
    If someone helps you, at least say thanks.

    Oh well, I'm glad you found the solution.

  • #5
    New Coder
    Join Date
    Oct 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sorry didn't mean it bad

    anyway here's what I found:

    http://www.dynamicdrive.com/dynamici...tchcontent.htm


  •  

    Posting Permissions

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