download button

download button

komserbeykomserbey Posts: 25Questions: 0Answers: 0
edited August 2013 in TableTools
Hello,

I am using the example on http://datatables.net/extras/tabletools/plug-ins (POST + GET)
I want give custom POST values to the button, but could not find a solution.

How can I do this?

Regards,

K

Replies

  • komserbeykomserbey Posts: 25Questions: 0Answers: 0
    edited August 2013
    Hello,

    I got another solution for this. Forget the above. Put this in aoColumns:

    [code]
    {
    "mData": null,
    "sClass": "center",
    "sDefaultContent": 'download'
    }
    [/code]

    And this after the dataTable():

    [code]
    $("#tableName tbody").on("click", "tr a", function(event){
    var id = $(this).closest("tr").find('td:first').text();
    location.href = 'test.php?id=' + id;
    });
    [/code]

    Regards,

    K
This discussion has been closed.