DataTable export not working in mozila Firefox

DataTable export not working in mozila Firefox

lucifer3211lucifer3211 Posts: 6Questions: 3Answers: 0

I am using datatables for exporting that is working fine for chrome and IE and in mozila the print option is coming only.I am posting the code i am using

$('#mainTable').dataTable({

            dom: 'T<"clear">lfrtip',
            tableTools: {
                "sSwfPath": "http://cdn.datatables.net/tabletools/2.2.3/swf/copy_csv_xls_pdf.swf",
            },
            "scrollY":        300,
            "scrollCollapse": true,
            "jQueryUI":       true,
            "aaSorting": []
        });
    }); 

and also i have the js and css files as they are working properly in chrome and IE.Somebody please help.

This question has an accepted answers - jump to answer

Answers

  • lucifer3211lucifer3211 Posts: 6Questions: 3Answers: 0

    some body please help in this

  • franks59franks59 Posts: 16Questions: 2Answers: 1
    Answer ✓

    This is what I have and it works for me:

    var dt_drives = $('#drives').DataTable( {
        "dom": "Tfrtip",
        "ajax": {
                    "url": "php/drives.php",
                    "type": "POST"
                },
        "columns": [
            {"data": "drives.key"},
            {"data": "drives.model"},
            {"data": "drives.manufacturer"},
            {"data": "drives.drive_size"},
            {"data": "drives.serial_no"},
        ],
        "tableTools": {
            "sRowSelect": "os",
                          "sSwfPath": "//cdn.datatables.net/tabletools/2.1.5/swf/copy_csv_xls_pdf.swf",
            "aButtons": [
                { "sExtends": "editor_create", "editor": drives_editor },
                { "sExtends": "editor_edit",   "editor": drives_editor },
                { "sExtends": "editor_remove", "editor": drives_editor },
                                {
                                    sExtends: "collection",
                                    sButtonText: "Save",
                                    sButtonClass: "save-collection",
                                    aButtons: [ 'copy', 'csv', 'xls', 'pdf' ]
                                },
                                'print'
            ]
        }
    } );
    

    Also be sure you have the Flash plugin installed for Mozilla (Firefox?)

    Frank

  • lucifer3211lucifer3211 Posts: 6Questions: 3Answers: 0

    thnaks my flash plugin was not enabled

This discussion has been closed.