Integration of deeplink.js into existing table
Integration of deeplink.js into existing table
Samu2nd
Posts: 8Questions: 2Answers: 0
Hey Guys,
i have a little problem with the integration of the deepLink plugin into my existing table.
This is my original table
$(document).ready(function() {
var dataTable = $('#mytable').DataTable( {
"iDisplayLength": 30,
"pagingType": "full",
"ajax": "Database.txt",
} );
} );
Now my table looks like this.
$(document).ready( function () {
$('#mytable').DataTable( $.fn.dataTable.ext.deepLink( [
'search.search'
] )
);
});
So where do i have to place my settings, for example.
"iDisplayLength": 30, or
"pagingType": "full", or
"ajax": "Database.txt",
Does anyone know that ?
I know its a dumb question but i don't get it.
Thx Samu
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @Samu2nd ,
You would just use them both together, like this:
Cheers,
Colin
Thx for your answer Colin
but i got the same result as always.
My pagination disappears and deeplink is not working.
This is my minimised Code.
Save it as TEST.htm
Hi @Samu2nd ,
Ah, sorry, the default options have to be inside the curlies, the deeplink outside - see here.
Cheers,
Colin
Hi Colin,
first i have to tell you that you forgot to remove the JS comment signs // at JS line 3 and 4. But unfortunately i get the same issue as before if i remove them. No pagination, and no deeplink function. If i dont remove them i have the pagination but still no deeplink function.
Thx Samu
Hi @Samu2nd ,
Not sure what happened there, that was a work-in-progress fiddle - this is a working one.
One thing to note is it won't work there, as the fiddle is being too clever and it strips out the search. If you try the attached file, the same code as in the fiddle, and add
?search.search=Anton
to the URL, you'll see it in action.Cheers,
Colin
Hi Colin,
you are right. Its working now.
Thanks for your time & help