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

Drop down list action

Satish Kulkarni
Ranch Hand

Joined: Jul 19, 2003
Posts: 60
I have a form with the drop down list of itmes. When a item is selected I want the form to be populated with a certain data.
For example
From a list of user, I select a a user and the user information is loaded. I can edit the user information and submit the form.
How would I achieve this?
-Satish
Peter Storch
Ranch Hand

Joined: Jun 12, 2003
Posts: 74
I've seen this with the help of javascript.
You can use the onChange attribute of your select tag to call a javascript which submits the form, so that it can be populated by an appropriet action class.
The thing you have to recognize is whether it's the final submit of the whole form, of if it's only a partial submit to fill out some other fields. This can be solved by setting a hidden field to a particular value.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Drop down list action