• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Radio button value with submit

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67537
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
That feels good. Thanks. Here's a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic