File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Get corresponding value from a dropdown Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Get corresponding value from a dropdown" Watch "Get corresponding value from a dropdown" New topic
Author

Get corresponding value from a dropdown

Antoniya Maydanova
Greenhorn

Joined: Feb 06, 2008
Posts: 1
Hi all,
I have a little (I hope) problem.
I have a dropdown box, populated by a DB. It shows for example "number1,number2, name", but I want it to hold only the numbers, because that is the real value I put into the DB, the name is only to make things clear. I want the name to show near the box and it should change everytime the user select value from the dropdown. I tried getting the value by script, but I want the name. Here is part of the code:



Thank you in advance
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30404
    
150

"Scarlet",
Please check your private messages for a message from me.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Get corresponding value from a dropdown