• Post Reply Bookmark Topic Watch Topic
  • New Topic

how can I get the value from Select multiple?  RSS feed

 
Bill Fang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my question is:

<select name=nam size=2 multiple='true'>
<option value=0 selected>a</option>
<option value=1>b</option>
<option value=2>c</option>
<option value=3>d</option>
</select>

if I select a,b then, how can I get the value of nam in another jsp page?

<% String nam=request.getParameter("nam"); %>

now the nam is always 0 while I selected a,b.
how can I get 0 and 1 ?


thanks,
bill
[ January 12, 2005: Message edited by: Bear Bibeault ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
moving to JSP forum
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Javadoc is your best buddy.

Check out the getParameterValues() method.
 
Bill Fang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it ,thanks a lot.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!