This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes dropdown Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "dropdown" Watch "dropdown" New topic


shah rah
Ranch Hand

Joined: Jan 04, 2007
Posts: 124
I have two dropdowns on my page and they are dependent. Main dropdown shows list of Groups. The dependent shows SubGroups for selected

I have a method getGroupInfo and it returns a map. inside my getGroupInfo I populate the map like this ...

map.put(groupcode,results) ---results is a list of subGroup objects

I am getting all the GroupInfo values when the page is called using session object. How can I change the values in subGroup dropdown based on the groupcode chosen? I am not sure how to manipulate the "results" on groups dropdown change event?

here is my hardcoded code

[ March 12, 2007: Message edited by: shah rah ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
This is referred to as "dependent dropdowns" or "dependent selects". It has been discussed recently in this forum in this thread. In addition, you will find a lot of information by "Googling" this topic.

Consultant, Sima Solutions
jQuery in Action, 2nd edition
subject: dropdown
Similar Threads
How can I add more text input base on users selection
Value returned from a select tag
storing values chosen from dropdown
dynamic data arranged in alphabetical order in html:select and html:options
passing two arrays to Javascript function