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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hide table with Radio Button

    Hi all,

    I have got a page with a pair of radio buttons Yes and No, when the user selects Yes I would like a table to be displayed otherwise I would like it to be hidden.

    I have seen an example on the internet but that hid a textbox but I couldnt figure out how it worked or how to modify it to hide a table.

    Thanks

    Stephen

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    São Paulo, Brazil
    Posts
    367
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Something like this should do it:
    Code:
    Show table
    <form>
    <input type="radio" name="rdoView" onclick="document.getElementById('tableID').style.display='block';"> Yes
    <input type="radio" name="rdoView" onclick="document.getElementById('tableID').style.display='none';"> No
    </form>
    <table id="tableID">
    ...
    /Daniel

  • #3
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Perfect.

    Thanks


  •  

    Posting Permissions

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