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

Populating fields with data on clicking radio button

 
Ranjeetitm Singh
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .
 
Himanshu Kansal
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic