Get table id while export if multiple table on page

Get table id while export if multiple table on page

@nuj_3313@nuj_3313 Posts: 15Questions: 5Answers: 0
edited December 2020 in Free community support

Hi all,
I have multiple tables on the same page, while export i want to name the file based on the table id, so I wanted to get the id of the table from where the export is happening. below is the test case.
http://live.datatables.net/sihitome/1/edit?html,js,output

This might not be the correct way of doing but this is how the code structure is, so i have to follow the same.
Thanks

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599
    Answer ✓

    You could do something like this - it's using a global variable and isn't particularly elegant, but it's doing the trick,

    Colin

  • @nuj_3313@nuj_3313 Posts: 15Questions: 5Answers: 0

    Great!... Thanks Colin.

This discussion has been closed.