• 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

collect values from a checkbox

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey peep,

I am very new to jsp/java and need some help.

I have a form that has four checkbox's that has different values (which is pulled from the database).

When I press the 'Compare' button, the page 'compare.jsp' is displayed.



Please note the form tag is displayed via a loop so in each loop the value of the checkbox is different.

My question is how can I collect the values of the checkbox, loop through them and display it on the page compare.jsp.

Thanks,
[ September 29, 2008: Message edited by: Bear Bibeault ]
 
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
I'm a bit confused. You are trying to gather the values of the input elements on the same page that they're created upon?
 
Zubi Pen
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The form is on a different page called form.jsp, and I am trying to get the values on the compare page which is compare.jsp.

Could you tell me how can to write a set method in java that takes in an array of strings, so basically I can pass the values of the form in the method.

I can then use a get method and loop through the array and display the values. That what I am thinking

Thanks,
Zub
[ September 29, 2008: Message edited by: Zubi Pen ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic