confirm message with plug-in "alert" created by Allan Jardine

confirm message with plug-in "alert" created by Allan Jardine

vospervosper Posts: 1Questions: 0Answers: 0
edited September 2009 in General
Hello everyone I need to use a plug-in by Allan Jardine to get the confirmation messages before running the update a mysql query.
Unfortunately I do not know how to integrate the plug-in with the DataTable.
Help me?

Replies

  • tgptgp Posts: 13Questions: 0Answers: 0
    I don't know if this is what are you looking for but this will help you:

    this function go to the url set on window.location.ref with the cuenta as GET param, the cuenta param is a data from the third column of the datatable on each row
    [code]
    oTable = $('#example').dataTable({
    // come code of data table here
    /* row click function */

    "fnDrawCallback": function() {

    $("#example tbody tr").click(function () {

    var nTds = $('td', this);

    var cuenta = $(nTds[2]).text();

    //var sGrade = $(nTds[4]).text();

    //alert(sBrowser);

    window.location.href = "the/url/to/go/on/click/cuenta";

    } );

    }
    /* end row click function */

    });
    [/code]
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Hi guys,

    Integration of Alert into DataTables should be a fairly simple process, the only tricky part is to get the event handler to call Alert and then Alert (on confirm) to to whatever you need to do with DataTables. What code have you got so far?

    Allan
This discussion has been closed.