Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82038

Puzzled - when I add TableTools, my existing page stops working

$
0
0
I had a lovely page, with advanced pagination and search - close to 1,000 rows all being sorted/filtered client-side.
Then I thought I'd add TableTools to have the export options.
I copied the initialisation code from the example - and the table reverted to a single long table again, no search, sort or pagination.
I have DataTables installed in a directory on my server referenced as /lib where I keep all the javascript code.
I'm assuming that I've got the paths confused somehow- unless TableTools is incompatible with advanced pagination?

I have:
<script language="Javascript" type="text/javascript" src="/lib/js/jquery-1.7.2.min.js"></script>
<link href="admin.css" rel="stylesheet" type="text/css" />
<link href="table.css" rel="stylesheet" type="text/css" />
<link href="/lib/datatables/css/jquery.datatables.css" rel="stylesheet" type="text/css" />
<link href="/lib/datatables/tabletools/media/css/tabletools.css" rel="stylesheet" type="text/css" />
<link href="/lib/datatables/tabletools/media/css/tabletools_JUI.css" rel="stylesheet" type="text/css" />
<script language="Javascript" type="text/javascript" src="/lib/datatables/js/jquery.datatables.js"></script>
<script language="Javascript" type="text/javascript" src="/lib/datatables/tabletools/media/js/tabletools.js"></script>
<script language="Javascript" type="text/javascript" src="/lib/datatables/tabletools/media/js/zeroclipboard.js"></script>

If my initialisation section looks like:

<script type="text/javascript">
$(document).ready(function() {
$('#clients').dataTable( {
"sPaginationType": "full_numbers",
"bFilter": true
} );
} );
</script>

It works fine, debug says 1 table. (tag=ifukiz)


If I change it to:
<script type="text/javascript">
$(document).ready(function() {
$('#clients').dataTable( {
"sPaginationType": "full_numbers",
"bFilter": true,
"sDom: 'T<"clear">lfrtip'
} );
} );
</script>

It doesn't include the TableTools functionality *or* the original sorting/paging.

What basic idiot mistake am I making?

debug says:

DataTables 1.9.4 Up-to-date
AutoFill Not installed
ColReorder Not installed
ColVis Not installed
FixedColumns Not installed
FixedHeader Not installed
KeyTable Not installed
Scroller Not installed
TableTools 2.1.4

But it also says: 0 tables.

Eh?

Viewing all articles
Browse latest Browse all 82038

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>