I want to delete a row which is checked but my program is deleting all the rows with

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • java9
    New Member
    • Oct 2015
    • 1

    #1

    I want to delete a row which is checked but my program is deleting all the rows with

    I want to delete a row which is checked but my program is deleting all the rows with input type: checkbox. iam using javscript in jsp



    Code:
    function deleteSelectedRows() {
    		$('#dataTable tr').each(function() {
    		    $(this).find('input[type="checkbox"]:checked').each(function() {
    		    	$('#delDependNames').attr("value", $('#delDependNames').attr('value') + "," + $(this).val());
    		    	$(this).closest('tr').remove();
    		    	displayNamesC();
    		    });
    		});
    	}
    Last edited by Rabbit; Oct 30 '15, 05:07 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • chaarmann
    Recognized Expert Contributor
    • Nov 2007
    • 785

    #2
    javascript is not java!
    Please move your post to the javasrcipt forum.

    Comment

    Working...