• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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: 67746
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 ]
 
Live a little! The night is young! And we have umbrellas in our drinks! This umbrella has a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic