Hello, I´m trying to email the full content of the datatable. In the code I have a condition that evaluates if the datatable is not empty and then I try to send the email, but I don´t know how to capture the full html of the datatable. I´m trying this:
…
setInterval(function () {
$(“#dataTable”).jqxDataTable(‘updateBoundData’);
if (dataAdapter.records.length !== 0) {
var gridContent = $(“#dataTable”).jqxDataTable(‘exportData’, ‘html’);
pageContent =
‘<!DOCTYPE html>’ +
‘<html>’ +
‘<head>’ +
‘<meta charset=”utf-8″ />’ +
‘<title>Errores Replicacion</title>’ +
‘</head>’ +
‘<body>’ + gridContent + ‘</body></html>’;
$.ajax({
url: ‘mail.php’,
type: ‘POST’,
data: { HTMLMsg: pageContent }
//success: function (msg) {alert(‘Correo enviado satisfactoriamente’ + msg);},error: function (msg) {alert(‘Falla al enviar el correo’ + msg);}
});
};
}, 30000);
…
Thanks,
Rafael