Hi,
In a JSP I have the next:
....
codigo = "<select name='" + nombre + "'>\n<optio n selected
value='default' >Escoge</option><option value='todos'>T odos</option>";
if (miRS != null)
while (miRS.next())
{
valorColumna = miRS.getString( nombre);
if (valorColumna.t rim().equals("" ))
do
{
miRS.next();
valorColumna = miRS.getString( nombre);
} while (valorColumna.t rim().equals("" ));
if (!valorColumna. trim().equals(" "))
codigo = codigo + "<option value='" + valorColumna + "'>" +
valorColumna + "</option>";
} // fin del while
codigo = codigo + "</select><input type='hidden' name='valor" +
posicion + "' value='+this.op tions[this.selectedIn dex].value+'>";
....
There, the hidden element should get the value of the selection made
by the user in the drop down menu.
In other JSP, I have to get this value. However, the value returned
is: +this.options[this.selectedIn dex].value+
How can I get the selected item value?????
TIA
In a JSP I have the next:
....
codigo = "<select name='" + nombre + "'>\n<optio n selected
value='default' >Escoge</option><option value='todos'>T odos</option>";
if (miRS != null)
while (miRS.next())
{
valorColumna = miRS.getString( nombre);
if (valorColumna.t rim().equals("" ))
do
{
miRS.next();
valorColumna = miRS.getString( nombre);
} while (valorColumna.t rim().equals("" ));
if (!valorColumna. trim().equals(" "))
codigo = codigo + "<option value='" + valorColumna + "'>" +
valorColumna + "</option>";
} // fin del while
codigo = codigo + "</select><input type='hidden' name='valor" +
posicion + "' value='+this.op tions[this.selectedIn dex].value+'>";
....
There, the hidden element should get the value of the selection made
by the user in the drop down menu.
In other JSP, I have to get this value. However, the value returned
is: +this.options[this.selectedIn dex].value+
How can I get the selected item value?????
TIA
Comment