hi
i want to display the selected values from a "select" object into a new window with jsp but no matter what i do, it always writes "null"
can you help me? this is mi code
<form id="form1" name="form1" method="post" onsubmit="revisar()" action="echo.jsp">
<table width="699" border="0" cellspacing="10" cellpadding="4">
<tr>
<th width="241" scope="row">
<div align="left">Habilitar/desabilitar secuencias</div>
</th>
<td>
<input type="checkbox" name="sec0" id="sec0">rotación a la izquierda <br/>
<input type="checkbox" name="sec1" id="sec1">rotación a la derecha <br/>
<input type="checkbox" name="sec2" id="sec2">intercalado <br/>
<input type="checkbox" name="sec3" id="sec3">parpadeo <br/>
<input type="checkbox" name="sec4" id="sec4">cuenta binaria rebotando
</td>
<td><input type="button" value="Actualizar" onclick="registrar()"/></td>
</tr>
<tr>
<th scope="row">
<div align="left">Asignar secuencias a botones</div>
</th>
<td>
botón 1 <select name="lista1" id="lista1"></select><br/>
botón 2 <select name="lista2" id="lista2"></select><br/>
botón 3 <select name="lista3" id="lista3"></select><br/>
botón 4 <select name="lista4" id="lista4"></select><br/>
</td>
<td><input type="submit" value="Actualizar" /></td>
</tr>
</table>
</form>
registrar() is a javascript wich fills the selects with the marked checkboxes. it creates them something like this like this
Option listax.options[listax.options.length] = new Option(text4,s4);
so they all have a text to display and a shortened value
revisar() is another javascript that makes sure no options were repeated in the selects. IT also WORKS.
echo.jsp is the one not working.
<%@ page language="java"
session="true"
isThreadSafe="true"
contentType="text/html; charset=ISO-8859-1" %>
<%
String name1 = request.getParameter("list1");
String name2 = request.getParameter("list2");
String name3 = request.getParameter("list3");
String name4 = request.getParameter("list4");
%>
content <br/><br/>
<%=name1 %><br/>
<%=name2 %><br/>
<%=name3 %><br/>
<%=name4 %><br/>
<html>
only displays nulls
and when i use the getParameterValues("listx"), the arrays it returns are filled with weird stuff (string java lang @ numbers numbers numbers letters numbers)
what am i missing?