aspose file tools*
The moose likes Struts and the fly likes Field Refresh Using AJAX in Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Field Refresh Using AJAX in Struts2" Watch "Field Refresh Using AJAX in Struts2" New topic
Author

Field Refresh Using AJAX in Struts2

Abdul Mujeeb Md
Greenhorn

Joined: Aug 25, 2008
Posts: 26
Hi,

How do we populate a text field with the value from database, when a dropdown value is selected.

eg: OnChange of a dropdown an AJAX event is to be triggered and populate the adjacent textfield with the value from the database.

Thanks.
Sean Clark
Rancher

Joined: Jul 15, 2009
Posts: 377

Hey,

You chave just given yourself the answer.
You cheate an onchange event that will send an ajax request and then populate some DIV (or an input box in this case) with the response.

Do you have any code to look at or a specific question?

Sean


I love this place!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Field Refresh Using AJAX in Struts2
 
Similar Threads
how to populate dropdown box dynamically
how to populate drop down list using servlet and jsp
dropdown & javascript
Dependent Drop- Down
JSF drop down.