Dynamic Print Message

Dynamic Print Message

INTONEINTONE Posts: 153Questions: 58Answers: 6
edited June 2016 in DataTables 1.10

Is there a way to get a dynamic print message. I tried:

{
                    extend: 'print',
                    message: '<h3>'+message+'</h3>'

} 

but the message variable will not pass

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    Answer ✓

    That code will execute immediately - there is no deleted execution there. It would require the message option for the print button to accept callbacks to be able to dynamically update the message, and unfortunately it doesn't do that. Good option for a future addition though - thanks.

    Allan

  • INTONEINTONE Posts: 153Questions: 58Answers: 6
    edited June 2016

    Allan,

    I am happy to report that I got:

    { extend: 'print', message: '<h3>'+message+'</h3>' }

    to work.

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    Tom's implemented dynamic function options for the PDF button types, and based on that I've just added it to the print button as well.

    Good to hear that you got it working for your use case though!

    Allan

This discussion has been closed.