• 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

Storing the value of a radio button

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am trying to store the values of radio button on a JSP page. Part of the HTML output of my JSP page is shown below:
<td width="82%">
<div class="page_title">Module Assessment 1</div>
<div><img src="images/spacer.gif" height="25"></div>
<table border="0" width="100%" align="center" width="100%">
<tr>
<th align="left" width="65%"></th>
<th class="small" width="5%">N/A</th>
<th class="small" width="5%">Strongly Agree</th>
<th class="small" width="5%">Agree</th>
<th class="small" width="5%">Neutral</th>
<th class="small" width="5%">Disagree</th>
<th class="small" width="5%">Strongly Disagree</th>
</tr>
<tr>
<td align="left">This module has given me a good understanding of the subject</td>
<td><input type="radio" name="1" id="1NA"> </td>
<td><input type="radio" name="1" id="1SA"> </td>
<td><input type="radio" name="1" id="1AG"> </td>
<td><input type="radio" name="1" id="1NE"> </td>
<td><input type="radio" name="1" id="1DI"> </td>
<td><input type="radio" name="1" id="1SD"> </td>
</tr>
<tr>
<td align="left">The module was well organised</td>
<td><input type="radio" name="2" id="2NA"> </td>
<td><input type="radio" name="2" id="2SA"> </td>
<td><input type="radio" name="2" id="2AG"> </td>
<td><input type="radio" name="2" id="2NE"> </td>
<td><input type="radio" name="2" id="2DI"> </td>
<td><input type="radio" name="2" id="2SD"> </td>
</tr>
etc...
How do I store the value that the user enters as their choice. I would like to store the value somehow into an access database using struts. I know how to access the database but am unsure where to start with storing the values of the radio buttons.
Many Thanks
Sheetal
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With Struts, you would create an ActionForm that has getters/setters for your form's fields.
See this tutorial: http://www.reumann.net/do/struts/main
 
You don't like waffles? Well, do you like this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic