Win a copy of Design for the Mind this week in the Design forum!
    Bookmark Topic Watch Topic
  • New Topic

help me regarding this selection box problem...

 
Pras Tiwari
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
In my struts application on one of my page I am displaying two drop-down boxes. One for "Group Name" & Other for "Sub-Group Name". Inside My form bean which loads JSP page, I am using A array of value object "GrpSubGrpData[]" for holding all the values of Groups & their correponding Subgroups from database. Now initially when I am displaying all the values of "Groups" in "groups" dropdown box. & Displaying nothing initially in Sub-Group menu. Now when user will click on any one of group in groups drop-down box, all the corresponding sub-groups should be displayed in "Sub-Group" drop-down box. Right now I am not getting any idea on how should I implement this. PLease give me some suggesions on how to solve this?
I am trying this since last two days. PLease help me.
Thank you in advance.
Pras
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Report post to moderator
The subject of dependent select boxes comes up frequently. This thread gives you an idea of some of the options available.
 
Pras Tiwari
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
I am also facing same problem as of Mitesh . Now I am trying to use solution Number-1 (One time database access - faster access). & I have 2 dropdowns & I am storing all the values of both the dropdown boxes into request scope. Now my problem is How should I display the content into second Drop-down box using Javascript?
I am displaying two drop-down boxes. One for "Group Name" & Other for "Sub-Group Name". Inside My form bean which loads JSP page, I am using A array of value object "GrpSubGrpData[]" for holding all the values of Groups & their correponding Subgroups from database. Now initially when I am displaying all the values of "Groups" in "groups" dropdown box. & Displaying nothing initially in Sub-Group menu. Now when user will click on any one of group in groups drop-down box, all the corresponding sub-groups should be displayed in "Sub-Group" drop-down box.
Now please tell me how should I use javascript here for populating second dropdown box?
PLease help me.
I am trying this since last 2 days but not succeeded so far.
Thank you in advance.
Pras
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question in multiple locations. It wastes the time of those willing to respond.
 
    Bookmark Topic Watch Topic
  • New Topic