aspose file tools*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Capturing selected check boxes" Watch "Capturing selected check boxes" New topic
Author

Capturing selected check boxes

Chak Terlapu
Ranch Hand

Joined: Oct 20, 2000
Posts: 32
Hi,
I have a servlet "main.java" 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 delete.java 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.
Thanks
Chak
Bosun Bello
Ranch Hand

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


Bosun (SCJP, SCWCD)
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.
Mike
------------------
Win the opportunity to make money on the Internet
[ULR]http://sweeps.sitesell.com/minirich.html[/URL]


Win the opportunity to make money on the Internet<br /><a href="http://sweeps.sitesell.com/minirich.html" target="_blank" rel="nofollow">http://sweeps.sitesell.com/minirich.html</a>
 
 
subject: Capturing selected check boxes