• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

select: on change action and retaining values

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have two combo boxes combo1 and combo2, Combo1 is populated with list of values from database. Upon selecting value in combo1 iam calling javascrpit function which submits form and populates combo2. The problem is since the form is submitted the combo1's selected value is not retained ?, how can I retain the selected value by the user??
Also how can I call two diffrent actions on change diffrent combo boxes ??, any help is appreciated..
I tried this Javascript but this doen't work..


Here is my actual code

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its simple. On submitting the form based on the values selected in combo1, retreive values for combo2. Then set it the request. For combo1, set both the selected and unselected values again in the request before forwarding it to the view.
 
shailesh kumar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply, but how can I call two diffrent actions, when I select values from combo1 I want to call action1 and on combo2 action2 ??
This javasctipt doesn't work and I looked at the LookupDispatchAction class in struts..but that logic will work with buttons only.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic