This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

auto-populate a textbox  RSS feed

 
Higgledy Smith
Ranch Hand
Posts: 193
IntelliJ IDE Java
  • 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
Posts: 66186
146
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
Boost this thread!