Remove items from select list based on checked items in table?

In order to remove an item you should do something like this: Remove an option : $("#classesList optionvalue='33'").remove() new $('#classesTable inputname="deleteClasses":checked'). Each(function(){ get values to remove and delete throught something like $(this).val() $("#classesList optionvalue='values'").remove(); }).

In order to remove an item you should do something like this: Remove an option : $("#classesList optionvalue='33'").remove(); new $('#classesTable inputname="deleteClasses":checked'). Each(function(){ get values to remove and delete throught something like $(this).val() $("#classesList optionvalue='values'").remove(); }).

JAiro, I added to my post a selector used elsewhere in the page. I need to only remove items in the dropdown that are checked in the table, so the jQuery selector needs to find checked items and remove the dropdown item based on matching the value attribute in the table with the value attribute in the options list. – eventide Jun 15 at 13:41 THAT'S more like it!

;) I should be able to work with that. Like your note says, I just need to get the value attribute using $(this) somehow and I should be good to go. I'll see if I can do it before someone posts the answer here first!

– eventide Jun 15 at 13:54 My rep is still too low, so I still can't answer my question, but here's what I came up with: $('#classesTable inputname="deleteClasses":checked'). Each(function(){ $('#classesList optionvalue="' + $(this). Attr('value') + '"').remove(); }); much thanks to JAiro for getting me that far!

– eventide Jun 15 at 14:07.

Here is code for delete checked iteam. Function submitForm(){ var submitForm = false; $( '. Cb-element' ).

Each(function () { if($(this). Is(':checked')){ submitForm = true; } }); if(submitForm){ if (confirm("Are you sure you want to delete")) { document. Forms"myform".submit(); }else{ return false; } }else{ alert('Please select an email to delete!'); } }.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions