HTML - Put SELECT tag content into INPUT type = "text"

Posted by mouthpiec on Stack Overflow See other posts from Stack Overflow or by mouthpiec
Published on 2010-03-29T16:20:59Z Indexed on 2010/03/29 16:23 UTC
Read the original article Hit count: 495

Filed under:
|
|

Hi,

I have a form in a webpage where I would like to put the selected item in a drop down list into a testbox. The code I have till now is the following:

            <form action = "">
                <select name = "Cities">
                  <option value="----">--Select--</option>
                  <option value="roma">Roma</option>
                  <option value="torino">Torino</option>
                  <option value="milan">Milan</option>
                </select>
                <br/>
                <br/>
                <input type="button" value="Test">
                <input type="text" name="SelectedCity" value="" />
            </form>

I think I need to use javascript .... but any help? :-)

thanks

© Stack Overflow or respective owner

Related posts about html

Related posts about select-tag