Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Get corresponding value from a dropdown" Watch "Get corresponding value from a dropdown" New topic

Get corresponding value from a dropdown

Antoniya Maydanova

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
author & internet detective

Joined: May 26, 2003
Posts: 32815

Please check your private messages for a message from me.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Get corresponding value from a dropdown
It's not a secret anymore!