TableTools not working

TableTools not working

neburtonneburton Posts: 63Questions: 6Answers: 0
edited November 2011 in General
Hi,

I'm trying to get the current version of tabletools working.

I'm using JQuery 1.7, JQUI 1.8.16 and datatables 1.8.2 with the latest tabletools.

I've set it up as per the example here : http://datatables.net/release-datatables/extras/TableTools/theme.html

The copy, csv, excel, pdf and save buttons are showing, however only the save > csv , save > excel or save > pdf are working, not the individual buttons.

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Sorry - I might be misunderstanding - do you mean that the copy, csv etc buttons are showing up, but they aren't working? If that is the case, then it is almost certainly an issue with the SWF file being loaded (or not as the case appears to be).

    If you have Chrome or Safari handy, then open your page up in one of those browsers and have a look at the Inspector's "console" tab - this will tell you if the server has reported any 404 errors. My guess is that the SWF is going to be hitting a 404 error due to a path issue. If that is the case then you need to set the path with something like:

    [code]
    $(document).ready( function () {
        $('#example').dataTable( {
            "sDom": 'T<"clear">lfrtip',
            "oTableTools": {
                "sSwfPath": "/swf/copy_cvs_xls_pdf.swf"
            }
        } );
    } );
    [/code]

    Regards,
    Allan
  • neburtonneburton Posts: 63Questions: 6Answers: 0
    It's not the path, as I read one of the previous posts regarding this, and checked it. I get 200 OK for copy_cvs_xls_pdf.swf

    In your example you have the Copy, CSV, Excel, PDF and Save buttons in a row. When I use your example none of the buttons work except those in the save button dropdown.

    I also have a problem with the save drop down in Internet Explorer 9, it just appears as a black box, although the links work in the dropdown still.

    http://5img.com/vimg443/1063/59capture.png
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    I'm afraid I've not seen the issue with the black box before, and I'm not 100% sure about the other issue either. Do you have a link that you can give me so I can see it in action myself? I'm just not sure what would be causing the problem at the moment I'm afraid.

    Allan
  • neburtonneburton Posts: 63Questions: 6Answers: 0
    It's an intranet app, so unfortunately I cannot provide access.

    I've seperated out the part of the app that show's this datatable onto a test page and all is working as it should so there must be a conflict coming from somewhere else in the app or one of the other jquery modules I'm using.

    Thanks for the help all the same.
  • neburtonneburton Posts: 63Questions: 6Answers: 0
    I've found the problem. I have some flash charts in my application http://www.fusioncharts.com

    The chart is loaded by calling a javascript function, which loads the swf file. Not sure if it's something in the javascript function or the swf movie itself that is causing the conflict.
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    How interesting - I've heard reports of TableTools being used successfully with Fusion Charts before, but I've also heard the odd whisper of a problem with them as well - but never been able to see what it would be.

    So if you don't load Fusion charts then it all works okay? But if you do then you get the black blob and not working tools? I wonder if the Fusion loader might be modifying all Flash movie instances it finds on the page - but I'm sure they would have caught that a long time ago. Do Fusion charts work if you don't enable TableTools? Are there any error messages on the control?

    Thanks,
    Allan
  • neburtonneburton Posts: 63Questions: 6Answers: 0
    I'll recreate my test page, with a single datatables instance and a single fusion charts chart and see what I come up with.
This discussion has been closed.