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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Location
    Seattle, WA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Please help me with drop down script

    Hi guys, I'm new to this forum and first off I wanted to say hi. But now I have a couple questions. I am building a website for a local business around here. I do know a little Javascript but not much. What I need is a form drop down box with three options. I would like when you select one of the options for another drop down box to appear underneath it. I would also like to know if there is a way to make a text box appear when you click a checkbox. Any help would be highly, highly appreciated and if you want I will give you credit for the script in the source on the web page.

  • #2
    New to the CF scene
    Join Date
    Aug 2002
    Location
    Seattle, WA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy HELP?

    Any ideas guys?

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    <html>
    <head>
    <title></title>
    </head>
    <body>
    <form style="width:120px;">
    <select name="s1"
    onchange="if(this.selectedIndex==2)s2.style.display='';else s2.style.display='none'">
    <option value="something">something</option>
    <option value="somethingelse">somethingelse</option>
    <option value="more">more</option>
    </select>
    <select name="s2" style="display:none;">
    <option>somethingelse</option>
    <option>somethingelse</option>
    <option>somethingelse</option>
    </select>
    <input type="checkbox" onclick="t1.style.visibility=this.checked?'visible':'hidden'">
    <input type="text" name="t1" style="visibility:hidden;">
    </form>
    </body>
    </html>

  • #4
    New to the CF scene
    Join Date
    Aug 2002
    Location
    Seattle, WA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Thank You

    Thank you very very much. That was exactly what I was looking for. I was surprised to see how easy it was. But just on one more note does you know what browsers that script would be compatible with? Again thank you very very much.

    -Adam


  •  

    Posting Permissions

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