Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Capturing selected check boxes

 
Chak Terlapu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you are just trying to determine if a particular checkbox ix checked.....
if(yourFormName.yourCheckbixName.checked)
do whatever....
Bosun
 
Mike Nightsky
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic