wood burning stoves*
The moose likes HTML, CSS and JavaScript and the fly likes Populating fields with data on clicking radio button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Populating fields with data on clicking radio button" Watch "Populating fields with data on clicking radio button" New topic
Author

Populating fields with data on clicking radio button

Ranjeetitm Singh
Greenhorn

Joined: Oct 01, 2008
Posts: 17
Hi all, I have a jsp page. On the left side of this page, some fields from a table in database is being displayed. The no of records can vary depending upon the search criteria chosen by the user earlier. This is how record is displayed on left side






Now I want to populate the input fields on the right side of this page , depending upon the radio button selected.
Means if the user selected second radio button , then the whole record corresponding to that radio button should get displayed in the input fields on the right side , so as to enable the user to edit them.At the same time partial record on left side should remain visible, so that he can choose a different one.

How to do this ?
Thanks to you all .


SCJA SCJP SCWCD
Himanshu Kansal
Ranch Hand

Joined: Jul 05, 2009
Posts: 257
This is an HTML/javascript question. Should be moved.

You can use the onclick event of radio button. Then getting the response can be done in 2 ways:
1. use ajax, to avoid loading whole page.
2. send a request back loading the whole page again.

Your choice!


Experience and talent are independent of age
 
wood burning stoves
 
subject: Populating fields with data on clicking radio button