drop down + create input field

Discussion in 'JavaScript' started by discoverclips, Dec 6, 2005.

  1. #1
    hi,

    I'm working on a form and I'd like to create a new text field only when a user clicks on a specific item in the drop down menu.

    i've looked around but haven't found anything yet..
    perhaps somebody can help me?

    thanks :)

    This is what i got:

    <input name="chk" type="checkbox" onClick="create();" value="">
    <input name="name" type="text" id="name" />

     
    discoverclips, Dec 6, 2005 IP
  2. discoverclips

    discoverclips Peon

    Messages:
    491
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    ok i found a useful code

    <script language="JavaScript">
    <!--
    function Show_Stuff(Click_Menu)
    // Function that will swap the display/no display for
    // all content within span tags
    {
    if (Click_Menu.style.display == "none")
    {
    Click_Menu.style.display = "";
    }
    else
    {
    Click_Menu.style.display = "none";
    }
    }
    -->
    </script>
    
    
     
     
    
    <input name="chk" type="checkbox" onmousedown="Show_Stuff(display1);" value="">
    <span ID="display1" style="display: none">
    <input name="name" type="text" id="name" />
    Code (markup):
    thanks :)
     
    discoverclips, Dec 6, 2005 IP