Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

I want to fill a Listbox with values dynamically using JSP when I press a button

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one combo box , and two list box and a button.
select name="mgroup" size="1"
option AAA option
option BBB option
option CCC option
select
select name="sgroup" size= 5
option value= 1 1 option
option value= 2 2 option
option value= 3 3 option
select
select name = finalsk select
I have a ADd button and when I press I have to display the value I selected in the combo and in the list (first) in the second list box..
"finalsk".
I am able to fill the "finalsk" list box with values
but when I try to see the source of the HTMl file it still shows
select name = finalsk select.. It has to show,.. say suppose I chose AAA and 1
select name = finalsk
option value= AAA1 AAA1 option
select
I want to update my form element "finalsk" with the values the user has
selected.
how to Do???
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming you want a servlet to calculate what the values in the third list box are, the only way I can think to do it without just regenerating the whole page is to put the third list box in a separate Frame and have your servlet regenerate the contents of that Frame.
An applet would also work of course.
Bill
 
We're all out of roofs. But we still have tiny ads:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!