Certainly should work. It should just be a case of including the 'T' option in the sDom for TableTools, and then the FixedHeader initialisation. What happens at the moment with the code you've got?
When I add the line [code]"sDom": 'T<"clear">lfrtip'[/code] the search box goes away and the SWF is not displayed. I set the init variable and the SWF is in the root with the php file. (I also added the script calls to TableTools.js and ZeroClipboard.js) Current code has the "sDom" line commented.
http://www.memphisyouthsoccer.com/availtest/reflog.php
The error console in Firefox has an "invalid label" error (says the "sDom" line is an invalid lablel). Don't see any other errors (got two warnings about unknown properties in TableTools.css -- box-shadow & border-radius).
My code is
[code]var oTable = $('#log').dataTable();
"sDom": 'T<"clear">lfrtip'
new FixedHeader( oTable, { "left": true, "bottom": true } );
});[/code]
Ah - you might have hit a bug in FixedHeader where it breaks for tables without a footer... Grab this script which has a fix committed: http://github.com/DataTables/FixedHeader/blob/master/js/FixedHeader.js
I already have that version (but downloaded and tried anyway). Doesn't seem to fix the footer problem for me - I have to have a footer to be able to freeze the left column. I did have the code incorrect above, I changed and it didn't fix TableTools problem but did let me turn off paginate. now code is
[code] $(document).ready( function () {
TableToolsInit.sSwfPath = "ZeroClipboard.swf";
var oTable = $('#log').dataTable( {
"bPaginate": false } );
If I uncomment the "sDom" line and replace } ); with a comma after "bPaginate" line then the Search box goes away and left column is no longer "frozen" AND the SWF is not displayed. But now I get a different error
Error: document.getElementsByTagName("title")[0] is undefined
Source File: http://www.memphisyouthsoccer.com/availtest/TableTools.js
Line: 455
I hope I am not doing something stupid and wasting your valuable time. I am more a hacker than a programmer unfortunately.
OK - I am clearly not the sharpest tool in this shed. But maybe someone else is having the same problem. And I was at least smart enough to figure out how dumb I was. The table file must have a or TableTools will not work - this may also have affected the footer problem (footer required).
The "box" appeared, but the "icons" are not being displayed - I can click on each area and the commands are activated (can save to clipboard, csv, excel and print), but no icons. I am looking in forum for an answer but if you can help this dummy please do.
Never mind, I am not a complete idiot - just a little too close for my own standards. But even I understand that the browser can not display an image that is not provided. Image that - I uploaded the image files and it works!
Not only are you extremely talented - you are good people. To provide this great code and support it for free (I am a bit strapped for cash at the moment, but I will make a donation soon) AND have patience with the likes of me - takes a special person like you. THANK YOU. (and from what I read, everyone else on the forum feels the same way)
Replies
Allan
http://www.memphisyouthsoccer.com/availtest/reflog.php
[code]
var oTable = $('#log').dataTable({
"sDom": 'T<"clear">lfrtip'
});
[/code]
I don't see why that wouldn't work. Do you get any JS errors?
Allan
My code is
[code]var oTable = $('#log').dataTable();
"sDom": 'T<"clear">lfrtip'
new FixedHeader( oTable, { "left": true, "bottom": true } );
});[/code]
[code]$(document).ready( function () {
TableToolsInit.sSwfPath = "ZeroClipboard.swf";
var oTable = $('#log').dataTable();
"sDom": 'T<"clear">lfrtip'
new FixedHeader( oTable, { "left": true, "bottom": true } );
} ); [/code]
Allan
[code] $(document).ready( function () {
TableToolsInit.sSwfPath = "ZeroClipboard.swf";
var oTable = $('#log').dataTable( {
"bPaginate": false } );
// "sDom": 'T<"clear">lfrti' } );
new FixedHeader( oTable, { "left": true, "bottom": true } );
} );[/code]
If I uncomment the "sDom" line and replace } ); with a comma after "bPaginate" line then the Search box goes away and left column is no longer "frozen" AND the SWF is not displayed. But now I get a different error
Error: document.getElementsByTagName("title")[0] is undefined
Source File: http://www.memphisyouthsoccer.com/availtest/TableTools.js
Line: 455
I hope I am not doing something stupid and wasting your valuable time. I am more a hacker than a programmer unfortunately.
The "box" appeared, but the "icons" are not being displayed - I can click on each area and the commands are activated (can save to clipboard, csv, excel and print), but no icons. I am looking in forum for an answer but if you can help this dummy please do.
Not only are you extremely talented - you are good people. To provide this great code and support it for free (I am a bit strapped for cash at the moment, but I will make a donation soon) AND have patience with the likes of me - takes a special person like you. THANK YOU. (and from what I read, everyone else on the forum feels the same way)