On Button Submit it getting only one page checkbox data not on of all pages in Sharepoint 2013
On Button Submit it getting only one page checkbox data not on of all pages in Sharepoint 2013
vishalgoyal
Posts: 1Questions: 1Answers: 0
Hi,
I have selected all checkboxes and now trying with below code to get selected checkbox data but it only returns the data which page is opened at that time like If I clicked on 1st page it will return only 1st page selected checkbox data.
$('#aspnetForm').on('submit', function(e){
debugger;
var form = this;
var email=new Array();
// Iterate over all checkboxes in the table
$('#CustomerRecordsTable ').DataTable().$('input[type="checkbox"]').each(function(){
// If checkbox doesn't exist in DOM
if($.contains(document, this)){
// If checkbox is checked
if(this.checked){
debugger;
//var val1= $(this).closest('tr').find('td:eq(6)').text();
email.push($(this).closest('tr').find('td:eq(1)').text());
}
}
});
$.each(email,function(key, value)
{
alert(key +" : "+value)
});
});
This discussion has been closed.