Making TableTools visible

Making TableTools visible

atcs2152atcs2152 Posts: 12Questions: 0Answers: 0
edited September 2010 in TableTools
I'm trying to add TableTools to my dataTables but it's not showing up. I'm pretty sure I have my TableToolsInit.sSwfPath set correctly. I'm using [code]"sDom": 'T<"clear">lfrtip'[/code] within my .ready(function(). I am NOT getting any JavaScript errors. With the sDom line in place my dataTables visible output has an extra 110 pixels of white space which is not there when it's commented out, so it's doing something. If it matters, I'm using the fnReloadAjax() function exclusively to populate the table. I'm attempting to use this on both IE6 and IE8 with dataTables 1.71. Any help getting this going would be very much appreciated.

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    I'd guess you don't have any styles for with which to show the tools and toolbar? If you look at the DOM in Firebug (or whatever), have the DOM elements been added?

    Allan
  • atcs2152atcs2152 Posts: 12Questions: 0Answers: 0
    Apparently not. I don't see anything in the documentation about having to add DOM element(s). Nor do I see any obvious DOM elements when I look at the source code for the live example. All I've done is set the sSwfPath and add the sDom line. I'm pretty new with dataTables and jQuery in general so I must be missing something fundamental. What DOM element(s) do I add and where do I add them?
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    edited September 2010
    You don't need to add any DOM elements - I was asking more if TableTools had added them automatically, and if they are in the DOM, but you simply can't see them because they aren't styled. Did you include the default stylesheet?

    Allan
  • atcs2152atcs2152 Posts: 12Questions: 0Answers: 0
    That was it! I didn't notice the style sheet in the package. Thank you very much.
  • atcs2152atcs2152 Posts: 12Questions: 0Answers: 0
    I guess I'm still not quite there. After I come back from the Print View, none of the four icons show up until I mouse over them. I tried pre-loading all eight images but that's not helping. When I try the same thing on the Demo page on the same browser, they show up as they should. Any suggestions for that?
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    I'm afraid I've not come across that at all - so I've no idea. Sorry :-(. The only thing I can think of would be to debug it using Firebug - see what state the elements think they are in.

    Allan
This discussion has been closed.