Results 1 to 3 of 3

Thread: drop down menu auto fills a field

  1. #1
    Join Date
    Feb 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question drop down menu auto fills a field

    This is what we are trying to do.

    When an item in a drop down field is selected, a text field within the same form will auto fill with the drop down menu value. But the text field will need to be locked so that they need to select from the drop down to change it.

    Thanks for any help.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    This should do it for you avidcat:
    HTML Code:
    <form>
    Transportation method: <select name="transportSelect" onchange="this.form.elements['transport'].value=this.value">
    <option value="Please select an option"></option>
    <option value="Car">Car</option>
    <option value="Boat">Boat</option>
    <option value="Air">Air</option>
    </select>
    <input type="text" name="transport" value="Please select an option" disabled="yes" />
    </form>
    Last edited by Nile; 08-12-2008 at 12:31 AM.
    Jeremy | jfein.net

  3. #3
    Join Date
    Feb 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That might just work perfect, thanks for coding that. I really appreciate it!

Bookmarks

Posting Permissions

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