• 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

getting form data

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
mornin all, im just trying to find some way to collect all data from a field of radiobuttons on a jsp site, to write it back in a database..what i got btw is this:
String paraname = "";
for (Enumeration selectedValues = request.getParameterNames();selectedValues.hasMoreElements(); ) {
paraname = selectedValues.nextElement().toString();
out.print("|"+paraname+"|");
out.println(request.getParameterValues(paraname));
}
problem is that it doesnt werk prolly some1 sees a solution?
[This message has been edited by eric clark (edited January 18, 2001).]
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For radio buttons, the "name" is the name of the group - there will be only one parameter for any radio button group so don't use request.getParameterValues(paraname)
use getParameter( paraname );
Bill
 
eric clark
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanx, it works now
greets eric
 
reply
    Bookmark Topic Watch Topic
  • New Topic