This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes transfer data from text box to multiple select list box. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "transfer data from text box to multiple select list box." Watch "transfer data from text box to multiple select list box." New topic
Author

transfer data from text box to multiple select list box.

sreeni san
Ranch Hand

Joined: Aug 14, 2001
Posts: 39
Hi,

I have a text box, a pair of radio buttons and a Multiple select List box in my HTML form.

I need to transfer data entered in the text box and the picked radio button to the drop-down list box on click of a button using JavaScript.

Lets assume that the value entered in the text box is "test_value" and the first radio button with value "1" is selected, then on click of a button, the drop-down list should be having an option set as "test_value,1".


Please help me.

Thanks,
Sreeni
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Have you looked up the API for the select element? What methods have you found that might help you?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: transfer data from text box to multiple select list box.