jQWidgets Forums

jQuery UI Widgets Forums DataTable Emailing full datatable content

This topic contains 3 replies, has 2 voices, and was last updated by  radt 8 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Emailing full datatable content #87091

    radt
    Participant

    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

    Emailing full datatable content #87121

    radt
    Participant

    Hello, … Please any help with this. Thanks.

    Emailing full datatable content #87146

    Hristo
    Participant

    Hello radt,

    You could achieve some workaround with some settings in the exportSettings property (when set fileName: null could export to variable) of the DataTable.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Emailing full datatable content #87209

    radt
    Participant

    Thanks Hristo, it works.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.