PDA

View Full Version : Submit multiple selected values


slaguila
09-07-2006, 11:24 AM
Hello,
I have a multiple selected list.
I created a routine to select all the options.

But I don’t know how to get the values after the submit.

In the form, I can get the selected options, but not after the submit (another jsp routine)

I am getting the values:
String organizationlist = request.getParameter("chosenlist")==null?"null":request.getParameter("chosenlist");

I only got the first value. I don’t know how to get the list.


Can anybody help me?
Thanks!

slaguila
09-07-2006, 12:11 PM
I found the solution:

String[] organizationlist = request.getParameterValues("chosenlist");
for(int loopIndex = 0; loopIndex < organizationlist.length; loopIndex++){
out.print(organizationlist[loopIndex] + "<BR>");
}

Thanks!