TableTools "T" Causing JS Error

TableTools "T" Causing JS Error

apadleyapadley Posts: 2Questions: 0Answers: 0
edited December 2010 in TableTools
I have a working dataTable. I want to add TableTools. As soon as I add a T to the sDom declaration I get the following javascript error in Firebug:

document.getElementsByTagName("title")[0] is undefined
[Break On This Error] sTitle = document.getElementsByTagName('title')[0].innerHTML;

with a reference to TableTools.js line 455

I am using jQuery 1.4.4 and jQuery UI 1.8.7 both loaded from the Google CDN. TableTools is version 1.1.4. DataTables is either version 1.6 or 1.7.5 .

Here is the simple code I'm using.

[code]










$(document).ready(function() {
TableToolsInit.sSwfPath = "../media/swf/ZeroClipboard.swf";
oTable = $('#roster').dataTable({
"bJQueryUI": true,
"sAjaxSource": 'ajax/event_roster.php',
"sDom": '<"H"lfrT>t<"F"ip>'
});
});





ID
First
Last
Email
Phone
Region
Youth







ID
First
Last
Email
Phone
Region
Youth



[/code]

Table renders perfectly without the T in sDom, but throws the error when the T is added.

I'm pretty sure I've missed something, but can't figure out what.

Replies

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    Sounds like you don't have a 'title' tag in your HTML header. It is possible to set a title using the TableToolsInit object, but normally you would any a title in your document wouldn't you?

    Allan
  • apadleyapadley Posts: 2Questions: 0Answers: 0
    Thanks, Allan. You are absolutely right. I was so absorbed looking for other causes that I didn't read the error message clearly. It was a missing title tag. Everything is working fine now.
  • LordOfHateLordOfHate Posts: 1Questions: 0Answers: 0
    Hi Allan, I have other problem. My error is:

    [code]
    Error: clip.setAction is not a function
    Archivo de origen: http://localhost/js/TableTools.js
    L
This discussion has been closed.