sum() result usable anywhere in html?

sum() result usable anywhere in html?

thowithowi Posts: 67Questions: 7Answers: 0

Hi there,

again, a noobie question, sorry for that :(

I am successfully using the sum() function which now puts the result into the table footer with the following code:

    drawCallback: function () {
            var api = this.api();
            $( api.table().footer() ).html(
                Math.round(api.column(3).data().sum() * 100)/100 + ' €'
            );
    }

But I'd like to use that result somewhere else in this .php file, right above the

<

table>. How can I do that?

Thank you so much!

Answers

  • thowithowi Posts: 67Questions: 7Answers: 0

    Got it by myself, replace line 3 to something like $( '#id' ).html( and there we are :D

This discussion has been closed.