The moose likes Servlets and the fly likes Capturing selected check boxes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Capturing selected check boxes" Watch "Capturing selected check boxes" New topic

Capturing selected check boxes

Chak Terlapu
Ranch Hand

Joined: Oct 20, 2000
Posts: 32
I have a servlet "" which connects to a database and displays a table. The table contains a check box in front of each row. It has three buttons at the bottom "add" modify" "delete". My question is when the user clicks on some check boxes and clicks on "delete" button how can i know in the script that these are the check boxes that have been checked or selected. It would be great if someone can give me a sample code of how to capture the check box events.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
if you are just trying to determine if a particular checkbox ix checked.....
do whatever....

So much trouble in the world -- Bob Marley
Mike Nightsky
Ranch Hand

Joined: Aug 18, 2001
Posts: 48
If you try to process it with a servlet, that is was i expect, you write:

and then you will get an stringarray of the checked boxes with their values.
This should work, i use it nearly every day.
Win the opportunity to make money on the Internet

Win the opportunity to make money on the Internet<br /><a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: Capturing selected check boxes
jQuery in Action, 3rd edition