Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Radio button value with submit

 
Frederik Ericsson
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,

I am retriving some records from DB and displaying in jsp, each record with one radio button which is generated dynamically.
and I have one submit button at the bottom of all records. once I select the radio button and press submit, I have to get the vaue of selected
radio button record, with that value I have to pull some more record from DB.

1. how to get the get the selected radio button value when i press the submit button.

2. with that value I have to call the java class, how to do that?


can you show some code to do that.

please help me out.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64607
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Frederik Ericsson:
1. how to get the get the selected radio button value when i press the submit button.
If all of the radio buttons have the same name, and each has a unique value, then a request parameter that you would obtain with request.getParameter() will be submitted with the specified name and the selected value.

2. with that value I have to call the java class, how to do that?

Not sure what you mean by this. Once you have the value you can do anything you want with it.
[ May 14, 2007: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic