Link to home
Start Free TrialLog in
Avatar of ncsvietnam
ncsvietnam

asked on

How to get display string in a select control

Hi Experts,

Please help me on below simple problem, thanks!
I have an JSP page, submit on itself, and a select control on it. My problem is how to get select control's display string, not it's value.
<body>
   <%
      // Get myList display string (One, Two, or Three). How?
      String selectedValue = request.getParameter("myList");
      // String selectedString = request.getWhat? 
   
      out.println(selectedValue );
      out.println(selectedString );
   %>
 
   <select name="myList" id="myList">
      <option value="1">One</option>
      <option value="2">Two</option>
      <option value="2">Three</option>
   </select>
</body>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Kuldeepchaturvedi
Kuldeepchaturvedi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ncsvietnam
ncsvietnam

ASKER

OK