Results 1 to 2 of 2

Thread: how can i show or hide?

  1. #1
    Join Date
    Apr 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question how can i show or hide?

    hi all,

    in a web page, how can i show/hide when appropriate option selected.
    for example
    whenever i click the show option in html page the table should be displayed
    <table>
    </table>
    whenever i click hide option the table should be hided.

    how can i do this via js.
    can any one help me..
    thanks.

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Code:
    <a href="#" onClick="document.getElementById('mytable').style.display = 'none';return false">Be gone!</a>
    <div id="mytable">
    <p>Hello</p>
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

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
  •