TypeError: TableTools is undefined.
TypeError: TableTools is undefined.
bigsipper
Posts: 31Questions: 2Answers: 0
Why am I getting the message 'TypeError: TableTools is undefined.' when running the following code?
If I use the firefox debugger, I can put a break statement inside /TableTools-2.2.0/js/dataTables.tableTools.js and verify that IS being loaded. I can also see that TableTools is defined (to a function).
But, when it hits my document.ready() function it is undefined. What in the world could be undefining it?
I've installed all the latest packages into their own standalone directories at the root of my web tree - but I suspect this is having a side affect when dataTables and TableTools loads up.... Is there some kind of dependence on the installation tree/structure that is undocumented?
Please help....
-Bigsipper
[code]
<!DOCTYPE html>
<!--[if IE 8]> <![endif]-->
<!--[if gt IE 8]><!--> <!--<![endif]-->
dragme
$(document).ready(function() {
$("#hoser").draggable();
var oTT = TableTools.fnGetInstance( 'expecttofail' );
}
);
[/code]
If I use the firefox debugger, I can put a break statement inside /TableTools-2.2.0/js/dataTables.tableTools.js and verify that IS being loaded. I can also see that TableTools is defined (to a function).
But, when it hits my document.ready() function it is undefined. What in the world could be undefining it?
I've installed all the latest packages into their own standalone directories at the root of my web tree - but I suspect this is having a side affect when dataTables and TableTools loads up.... Is there some kind of dependence on the installation tree/structure that is undocumented?
Please help....
-Bigsipper
[code]
<!DOCTYPE html>
<!--[if IE 8]> <![endif]-->
<!--[if gt IE 8]><!--> <!--<![endif]-->
dragme
$(document).ready(function() {
$("#hoser").draggable();
var oTT = TableTools.fnGetInstance( 'expecttofail' );
}
);
[/code]
This discussion has been closed.
Replies
I could be missing something here, but afaik you need to initialise a datatable in your docready function. Just linking to the js doesn't do it.
[code]
<!DOCTYPE html>
<!--[if IE 8]> <![endif]-->
<!--[if gt IE 8]><!--> <!--<![endif]-->
Rendering engine
Browser
Platform(s)
Engine version
CSS grade
Trident
Internet
Explorer 4.0
Win 95+
4
X
$(document).ready(function() {
$('#todo').dataTable();
var oTT = TableTools.fnGetInstance( 'todo' );
}
);
[/code]
Thanks,
Allan
"TableTools: Warning - unknown button type: editor_edit"
"TableTools: Warning - unknown button type: editor_create"
After upgrading a previously working system to jQuery 1.11.0, Tabletools 2.0.0, Datatables 1.9.4 and Editor 1.2.4.
Thanks Allan, will watch for the release version.
I was able to get it to work by editing TableTools-2.2.0/js/dataTables.tableTools.js
I removed line #443:
442: /* Global scope for TableTools */
443: var TableTools;
I will try 2.2.1-dev and let you know.
Allan