How to navigate to a specific page on DataTable
How to navigate to a specific page on DataTable
aboni
Posts: 1Questions: 1Answers: 0
Hi, all. Is there a way to go to same specific page on DataTable, using a HREF link ?
This discussion has been closed.
Answers
Hi @aboni ,
Not with a HREF, as it's all within the single JS block, but you can use the DataTables API to navigate between pages -
api -page()
Cheers,
Colin
Hi @aboni and @colin
Yes you can. I use the plugin at https://datatables.net/plug-ins/api/row().show() to jump to the appropriate page. I also make sure that each tr has a row id.
The url column contains a link that points back at itself and contains a row id. So, what ever row you click on what ever page, that should be were you end up when the page loads.
The data I used for this example was copied from https://www.datatables.net/examples/ajax/data/objects.txt