The moose likes HTML, CSS and JavaScript and the fly likes auto-populate a textbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "auto-populate a textbox" Watch "auto-populate a textbox" New topic

auto-populate a textbox

Higgledy Smith
Ranch Hand

Joined: Mar 07, 2006
Posts: 192
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

Joined: Jan 10, 2002
Posts: 63865

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.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: auto-populate a textbox
It's not a secret anymore!