aspose file tools*
The moose likes Struts and the fly likes select: on change action and retaining values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "select: on change action and retaining values" Watch "select: on change action and retaining values" New topic
Author

select: on change action and retaining values

shailesh kumar
Ranch Hand

Joined: Jul 18, 2005
Posts: 36
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

Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
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

Joined: Jul 18, 2005
Posts: 36
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: select: on change action and retaining values
 
Similar Threads
populating a combo box
How to submit a page on change of Combo using Struts
Fill combo using properties file
show different content after a choice in a combobox
getParameter question