
I have a table with about 20rows, which contain a checkbox and a bit of text each. What I'm trying to find a way to do is to have delete button at the bottom of the page.When i clicked on DELETE button, it should delete records of checked checkbox rows. I need to delete all the table rows which contain CHECKED textboxes.and remaining checkboxes should be displayed. And we should keep remaining checkboxes in ARRAYLIST.
I want to delete checked checkboxes.And store all unchecked checkboxes in Arraylist(collection). and print that arraylist.
I've been able to get bits of it to work at various times, but I'm running out of time and I really need help. Any suggestions anyone has would be more than appreciated! Please,Help me Thanks!

I am not sure that I have clearly understood your question. I think you want to show the records of a table in a form and the checked records are to be deleted from the table after clicking the DELETE button.
If this is your question for this, you can do the following:
Use submit or button to post the form information to page. Check for which ID (primary key) the checkbox is "on" and for which it is null. For "on" checkboxes delete the record and for null add them to ArrayList. Use if-else for this.
rs = stmt.executeQuery("SELECT emp_id FROM emp");
while (rs.next) { String checkbox = request.getParameter("emp_id"); if (checkbox == null ) { al.add(Object); } else { stmt1.execute("DELETE emp WHERE empid"+ = empid); } }
I have written this code assuming that it's a part of a file. You will have to create ArrayList, connection, statement, etc. I hope this will help you.

Thanks for your valuable reply... But I have a arraylist of records. From that arraylist , if i want to delete some records of table ,then using checkboxes,after checking some of checkboxes, i want to delete selected (checked)checkboxes.And remaining checkboxes should be retained in that arraylist. So, previous arraylist is replace by new arraylist with same name.
Please, can you give me some code.Actually i tried hard to get it.But i am going out of time.So, please help me.
Thanks in advance !!!!!!! :)
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.