• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pass value of a combobox to ... ?

 
marko markovic
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
on a JsPage with scope="session", i have a combobox and want to pass his values and his selected value to another JsPage with Session or something other.
What is the best method to pass the values and not forget the selected value and get the same like:
First page: example of a combobox
combobox:
Key: 1 One
2 Two <= selected value
3 Three
now pass to the second page:
combobox:
Key: 1 One
2 Two <= selected value
3 Three
Thanks for help!
$Regards
 
Kevin Mukhar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The combobox is in a <form> tag. Simply submit the form to another JSP. In the other JSP you can get the selected values by calling
String name = "name_of_combo_box";
String[] selections = request.getParameterValues(name);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic