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

Thread: Auto Drop Down

  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Auto Drop Down

    I basicly need something like:

    http://javascript.internet.com/form...-drop-down.html

    But instead of the list it gives you (After you select something from the drop down menu), I need it to have text boxes. I also only need 2 different things in the Drop Down Menu.

    I've tryed this over and over again and can't get it to work... Can someone please post the code for what I am trying to do?

    For Example:

    Option 1) Boat
    Option 2) Car

    If Selected 'Boat', they would recieve something like:

    "What kind of boat do you like?' [_______TEXT BOX________]
    "How often do you boat?' [_______TEXT BOX________]

    If Selected 'Car', they would recieve something like:

    "What kind of car do you like?' [_______TEXT BOX________]
    "How often do you drive in your car?' [_______TEXT BOX________]

    Thanks.

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,511
    Thanks
    3
    Thanked 504 Times in 491 Posts
    PHP Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd"
    >

    <
    html>

    <
    head>
      <
    title></title>
    <
    script language="JavaScript" type="text/javascript">
    <!--

    function 
    Show(obj){
     if (
    obj.selectedIndex<1){ return; }
     
    obj=obj.options[obj.selectedIndex].value;
     
    document.getElementById('boat').style.display='none';
     
    document.getElementById('car').style.display='none';
     
    document.getElementById(obj).style.display='block';
    }
    //-->
    </script>

    </head>

    <body>
    <select name="" size="1" onchange="javascript:Show(this)" >
    <option value="" >Select</option>
    <option value="boat" >Boat</option>
    <option value="car" >Car</option>
    </select>
    <br>
    f Selected 'Boat', they would recieve something like:
    <p id="boat" style="position:relative;display:none;" >
    "What kind of boat do you like?' <input name="" size="10"><br>
    "How often do you boat?' <input name="" size="10"><br>
    </p>
    <br>
    If Selected 'Car', they would recieve something like:
    <p id="car" style="position:relative;display:none;" >
    "What kind of car do you like?' <input name="" size="10"><br>
    "How often do you drive in your car?' <input name="" size="10"><br>
    </b>
    </body>

    </html> 

  • #3
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Awesome! THANKS!

    Now, I can't get the Submit button to work. I'm using:

    <FORM action="MAILTO:lightening_larmore_racing@yahoo.com" enctype="text/plain" NAME="myform" ACTION="" METHOD="GET">

    -

    <input type="submit" value="Send">
    <input type="reset" value="Reset">

    But when I hit "Submit" it only opens a new e-mail with my e-mail address... doesn't send the form.

    Any help with be greatly appreciated.

    Thanks
    Matt

  • #4
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I still can't get it to submit the details.


  •  

    Posting Permissions

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