SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    pakistan
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML Text Box through Javascript

    Hello friends how ru,
    i want to display HTML textboxes on the click of a mouse otherwise they will hide from the user but when user click on the textbox link it will be displayed on the screen how it could be possible in javascript pls tell me.
    THANKS

  2. #2
    Beer Monster -Ox's Avatar
    Join Date
    Apr 2003
    Location
    sowth afreeka
    Posts
    374
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am not 100% sure if I totally understand what you are asking, but this may help you on the way.

    <script type="text/javascript">
    function hide(){
    if (document.getElementById('txt').style.display == 'block'){
    document.getElementById('txt').style.display = 'none'
    }
    else {
    document.getElementById('txt').style.display = 'block'
    }
    }
    </script>

    <a href="#" onclick="hide()">click / hide</a><br /><br />
    <div id="txt" style="display: block;">
    <textarea></textarea>
    </div>

    /Ox
    My postings are a natural product.
    The slight variations in spelling and grammar enhance its
    individual character and beauty and in no way are to be
    considered flaws or defects - http://www.guinnesspig.net


Bookmarks

Posting Permissions

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