Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

delete checked checkboxes and display unchecked checkboxes  RSS feed

 
rahulj rjagtap
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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!
Thanks!
 
Rajkishore Pujari
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you planning to make a server call when you click on delete? You can actually disable and hide them using Javascript when you click on delete and when you save the form, the disabled (which are also hidden in this case) checkbox values will not be sent to server and you will have only uncheked checkboxes.
 
Sai Hegde
security forum advocate
Ranch Hand
Posts: 214
1
Android Flex Google App Engine
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, delete could be a hard delete with the delete persisting to your database.
Assign values to the checkboxes while you are populating the table at the first instance. As for the rest, I think you could figure it out.
 
rahulj rjagtap
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 !!!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rahulj rjagtap wrote: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.

Please read this: NotACodeMill
 
rahulj rjagtap
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator




Please, I tried this code. BUt i am getting problem in storing deleted checkboxes in arrylist. And that arraylist should be displayed below Remove button in java.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!