Multiple Select
[nobr]Hi,
I am having problems with the multiple select option of html. Here are two pages which demonstrate:
Showlist.html:
<html>
<head>
<title>List</title>
</head>
<body>
<form action="listout.jsp" method="post">
<select multiple="multiple" size="5" name="optionlist">
<optgroup label="numbers">
<option value="one">one</option>
<option value="two">two</option>
<option value="three">three</option>
<option value="four">four</option>
</optgroup>
</select>
<br/>
<input type="submit"/>
</form>
</body>
</html>
listout.jsp
<%@page import="java.util.*"%>
<HTML>
<BODY>
<%
Enumeration e = request.getParameterNames();
while(e.hasMoreElements())
{
%>
<%=e.nextElement()%><BR/>
<%
}
%>
<%=request.getParameter("optionlist")%><BR/>
</BODY>
</HTML>
Basically I want to be able to use ALL of the options selected in my jsp page. When I select 'one' and 'four' the paramter mainlist = 'one' the first item selected. I cannot see how to read all of the items.
Does anyone know how to do this. I really want to keep within the confines of JSP or HTML, I do not want to include JScript if I can avoid it.[/nobr]

