Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

auto-populate a textbox

 
Higgledy Smith
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how to populate a textbox based on a value the user selects in a comboBox? For instance, when a user selects "Choice A" from the comboBox, I want the textBox to be populated with the text "GOOD CHOICE". If user selects "Choice A", the textBox is populated with "BAD CHOICE". I am really stuck. Thank you. Higgledy
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64688
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, it's important to use proper terminology. There's no such thing as a "combo box" in HTML. Read: HtmlHasNoComboBox

Second, where's the code you've tried so far? We're more than happy to help, but we won;t write the code for you. To get you started, obviously you'll need a change handler on the select element.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic