O
Omar
Hi,
In a JSP I have the next:
....
codigo = "<select name='" + nombre + "'>\n<option selected
value='default'>Escoge</option><option value='todos'>Todos</option>";
if (miRS != null)
while (miRS.next())
{
valorColumna = miRS.getString(nombre);
if (valorColumna.trim().equals(""))
do
{
miRS.next();
valorColumna = miRS.getString(nombre);
} while (valorColumna.trim().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.options[this.selectedIndex].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.selectedIndex].value+
How can I get the selected item value?????
TIA
In a JSP I have the next:
....
codigo = "<select name='" + nombre + "'>\n<option selected
value='default'>Escoge</option><option value='todos'>Todos</option>";
if (miRS != null)
while (miRS.next())
{
valorColumna = miRS.getString(nombre);
if (valorColumna.trim().equals(""))
do
{
miRS.next();
valorColumna = miRS.getString(nombre);
} while (valorColumna.trim().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.options[this.selectedIndex].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.selectedIndex].value+
How can I get the selected item value?????
TIA