sExtends makes flash crash

sExtends makes flash crash

DrakoDrako Posts: 73Questions: 0Answers: 0
edited January 2011 in TableTools
The flash plugin always stops responding and crashes when i use the "sExtends": "collection"

also, for some reason on 2.0 the buttons dont work on firefox 3.6.13

using chrome 9.0.597.42 beta

screenshots:

chrome
http://img718.imageshack.us/img718/8375/chrometz.jpg

firefox
http://img688.imageshack.us/img688/3746/firefoxt.jpg
code

[code]

oTable = $('#table1').dataTable( {

"oTableTools": {
"sSwfPath": "TableTools/media/swf/copy_cvs_xls_pdf.swf",
"aButtons": [
"copy",
"print",
{
"sExtends": "collection",
"sButtonText": "Save",
"aButtons": [ "csv", "xls", "pdf" ]
}
]

},
"bLengthChange": true,
"bInfo": false,
"sDom": '<"H"lfr>t<"F"ip>T',
"bAutoWidth": false,
"bRetrieve": true,
"bJQueryUI": true
});
} );
[/code]

Replies

  • DrakoDrako Posts: 73Questions: 0Answers: 0
    still cant make it work on firefox, all buttons are disabled except for print.

    on chrome it works fine except when i use sExtends.
  • allanallan Posts: 63,489Questions: 1Answers: 10,469 Site admin
    This example which shows basically the code above: http://datatables.net/release-datatables/extras/TableTools/collection.html - and it seems to work okay in both Firefox and Chrome for me. Are you sure you got the SWF path correct? Should it be absolute or relative?

    Allan
  • DrakoDrako Posts: 73Questions: 0Answers: 0
    its strange because it works fine on chrome but not on firefox, you can see on the screenshots that the buttons are overlapping my form (on firefox) for some reason.

    the code is exactly the same, im sure the SWF path is correct because when i change it stops working on chrome, and it was working on the last version (on firefox) it stop working after i updated to 2.0
  • allanallan Posts: 63,489Questions: 1Answers: 10,469 Site admin
    Interesting - are you able to give us a link to the page so we can see what is going on? If you don't want to make it public, you can send it to be direct using the form here: http://datatables.net/contact

    Allan
  • DrakoDrako Posts: 73Questions: 0Answers: 0
    sorry, im using it locally, i dont have access to a webserver.

    since my flash was crashing when i used sextends i changed to regular buttons, still doesnt work on firefox though.

    i just found out that if i take the form out the divs (container and demo) and buttons wont overlap the form on firefox anymore.

    but they still wont work.

    also tried on IE and its even worst, my hidden column appears, the jqueryUI doesnt apply, and the datatools buttons dont appear at all.

    maybe my code is wrong? and if it is, why does it work on chrome?
    this is all my jquery code
    [code]


    $(document).ready(function() {
    var giRedraw = false;
    var oTable;

    $("#table1 tbody").click(function(event) {
    $(oTable.fnSettings().aoData).each(function (){
    $(this.nTr).removeClass('row_selected');
    });
    $(event.target.parentNode).addClass('row_selected');
    });


    $('#Enviar2').click(function(){

    var aTrs = oTable.fnGetNodes();
    var user = "<?php echo $_COOKIE["nome_usuario"];?>";
    if(user=='Kelly' || user=='Teste')
    {
    var res = confirm("Deseja deletar o defeito selecionado?");
    if(res)
    {
    for ( var i=0 ; i
  • allanallan Posts: 63,489Questions: 1Answers: 10,469 Site admin
    If you are using file:// protocol (i.e. as you say, no web-server) - have you got an exception in for Flash security? Flash won't run using file:// unless you add in an exception for the path: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html

    Allan
  • DrakoDrako Posts: 73Questions: 0Answers: 0
    i managed to get into a webserver, one page is acting weird though.. i will send the link on the contact form.

    thanks Allan.
  • allanallan Posts: 63,489Questions: 1Answers: 10,469 Site admin
    Thanks for the link - very useful! Although I've got to admit that I'm a little bit at a loss... I have no idea why Firefox isn't rendering the page correctly. There is obviously some interaction going on with the Flash file since it's highlighting the button - but I can't say why it isn't copying it to clipboard (Safari has no such problems).

    So next thing to try is this:

    [code]

    "oTableTools": {
    "sSwfPath": "TableTools/media/swf/copy_cvs_xls_pdf.swf",
    "aButtons": [
    {
    "sExtends": "copy",
    "sButtonText": "Copy to clipboard",
    "fnClick": function( nButton, oConfig, flash ) {
    alert( this.fnGetTableData(oConfig) );
    this.fnSetText( flash, this.fnGetTableData(oConfig) );
    },
    }
    ]
    }
    [/code]
    If you do that - do you get the alert?

    Allan
  • DrakoDrako Posts: 73Questions: 0Answers: 0
    I get the alert on chrome, firefox still the same, button does not work (also does not highlight).

    You can see that it does highlight only the print button, not the other ones, i have seen someone else with similar problem here.
  • allanallan Posts: 63,489Questions: 1Answers: 10,469 Site admin
    Actually the highlight for copy etc works just fine for me with Firefox Mac 3.6.13. If you don't even get the click - then I'm afraid that TableTools will need debugging - more specifically the Flash component. I totally can't understand why it's working Safari and not Firefox. If you position the toolbar above the table, does that help at all? It would also be worth running your page through the W3C validator.

    Allan
  • DrakoDrako Posts: 73Questions: 0Answers: 0
    edited January 2011
    doesnt help moving the toolbar, it still doesnt work, also, i put the pages through the w3c validator and saw nothing... its strange that you get the highlight and i cant, how is that possible? Just to be sure, i get highlight but only for print. (using windows xp)

    how can i debug this?

    thanks!
  • allanallan Posts: 63,489Questions: 1Answers: 10,469 Site admin
    Could you possibly send me a message using the form at http://datatables.net/contact - and I'll e-mail you a debug version of the SWF which will have trace statements so I can see what is going on :-)

    Thanks,
    Allan
  • allanallan Posts: 63,489Questions: 1Answers: 10,469 Site admin
    Thanks for the mail - I'm reasonably certain that the issue is due to your using the version of ZeroClipboard which came with TableTools 1, rather than the version which came with TableTools 2. If you switch them, things should start working again. I'll see if I can put in a check for this in 2.0.1.

    Allan
  • DrakoDrako Posts: 73Questions: 0Answers: 0
    thanks a lot Allan, thats was the problem, all buttons are working on firefox now.

    But my other 2 problems still remain, sExtends still makes flash crash (only on chrome) and im still having the problem that the buttons are overlapping my form on firefox (works on chrome,opera and IE). You have any ideia why?

    thanks!
  • allanallan Posts: 63,489Questions: 1Answers: 10,469 Site admin
    For the Firefox issue just add style="clear:both" to the form tag below the table.

    For Chrome - seems to work just fine for me - using Chrome 8.0.552.231 - Mac. No crash, so I'm afraid I'm not sure I can help. Might be an idea to see if you can get any debug information from Chrome.

    Allan
  • DrakoDrako Posts: 73Questions: 0Answers: 0
    thanks!! it works!! =)

    im using the beta version 9.0.597.47 - PC, maybe its something on this beta version, i tested on another pc with chrome 8 and it was working too.

    hopefully google will fix it.

    thanks a lot Allan!
This discussion has been closed.