Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.


    • CommentAuthorwebguy
    • CommentTimeNov 7th 2006
     
    Hello all,

    I am a new web designer and i have to finish a project for my job.
    I use dreamweaver and i have a combobox named country and a text field named email. I want the user choose a country from the combobox and the email for this country go to a text field. Lets say the user choose England from the combobox and an email will be puted in text box. I use PHP or ASP.
    This is my form:
    <td><select name="country" id="country">
    <option>1</option>
    <option>2</option> </select>


    <input name="email" type="text" id="email" value="email for the country in combo box"> </td>
    So if you know something i need your help!
    Thank u!
  1.  
    You need to use javascript...


    <script type="text/javascript">
    function fillInput() {
      document.email.value = document.country.value;
    }
    </script>

    <select name="country" id="country" onchange="fillInput()"><option value="email@domain.com">United States</option></select>

    <input id="email" name="email" type="text" value="defaultemail@domain.com">