Change your code to:

userId = request.getParameter("Users");

----- Original Message -----
From: Amar Das <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 16, 2000 9:12 AM
Subject: Reading option value from select


> Hi all,
>
> I have a form the submit buttons calls a servet.  The form has a select
> box like the following.
>
> <SELECT Name="Users" Size="9" onChange=showValue()>
> <OPTION value=5>Barbara  Parker
> <OPTION value=1>Glenn  Angell
> <OPTION value=2>Jon  Woodard
> <OPTION value=9>Jonathan  Ives
> <OPTION value=8>Lyle  Hall
> <OPTION value=3>Robert  Randal
> <OPTION value=4>Stephen  Flannery
> <OPTION value=7>Stu  Rich
> <OPTION value=6>Tambra  Gallant
> </SELECT>
>
> In the servlet code I have someting like the following to grab the
> selected value in the form
>
>       try {
>         userId =
> request.getParameter("Users.options[users.selectedIndex].value");
>
>       }
>       catch(Exception e) {
>         e.printStackTrace();
>       }
>
> Unfortunately, it is not working.  Please help.
>
> Amar Das
> St. George Consulting Group
> Rockland, Maine
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to