File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes list......jsp, javascript 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 "list......jsp, javascript" Watch "list......jsp, javascript" New topic

list......jsp, javascript


Joined: Jul 26, 2001
Posts: 4
hi all,
I want to pass all the values in a <select size=3 name=""> into a jsp processing page (.jsp) thru a html form.
How should actually i do that?
Can i get all the values (a list in an array), or only one value?
Please do give me some advice or solution asap.
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
code your select object to allow for multiple selections:
<select name="mySelect" size="3" multiple="true">
At the server side, have a look at the method getParameterValues() of javax.servlet.ServletRequest which returns a String[] for parameters that might have more than one value.
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
I partially misread your post.
Here is some code to select all the values from your select object.
The server side comment still stands true though.
I agree. Here's the link:
subject: list......jsp, javascript
It's not a secret anymore!