This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Drop down list action

 
Satish Kulkarni
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic