• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

collect values from a checkbox

 
Zubi Pen
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • 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 ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65123
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic