If the select box is a <select multiple> (I'm not sure if the multiple attribute can be set through JavaScript or not, but that would be nice), I believe you can iterate through the <select> object's options and set each index to selected (you can do this onSubmit). Then all of the selected values in the <select> will be sent as an array in the request. Let me know what you find out.
 
David Eaves
-----Original Message-----
From: Kelvin Tee [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 28, 1999 8:48 PM
To: [EMAIL PROTECTED]
Subject: passing array from jsp to servlet

Is there any way of passing an array from a .jsp file to a servlet?
 
In the .jsp file, there is a listbox with a list of options. What I intend to do is to pass the entire content of the listbox into a servlet so that it can be processed. I can iterate thru each listbox elements in a JavaScript function using the options object and store each element in an array but how am I suppose to pass the array to a servlet?
 
Any solution would be most appreciated. Thanks.

Reply via email to