Want loading image while the tabletools exports the pdf/excel

Want loading image while the tabletools exports the pdf/excel

drakula1234drakula1234 Posts: 58Questions: 1Answers: 0
edited January 2013 in TableTools
Allan,

Thanks for the wonderful plugin.

I am using the table tools download (POST + GET) plugin to do the server side export. While the server is creating the pdf I want something like loading image and should be closed when I get the download window opened. I am using jquery dialog to be opened when I click on the button, but I am not sure how to close it.

[code]
"fnClick": function( nButton, oConfig ) {
$(' Loading').dialog({ modal: true});
...
...
}
"fnComplete: function(nButton, oConfig) {
$('#loading').dialog('destroy').remove();
}
[/code]
fnComplete is called after the fnClick opens the dialog thus the result is no opened dialog. Is there a way to have this dialog closed when the download window opens.

Replies

  • allanallan Posts: 61,920Questions: 1Answers: 10,153 Site admin
    You'd need to attach a 'load' event handler to the iframe where it is generated, as that is the only way to know when the inner document has fully loaded. This is an interesting article about the topic: http://www.nczonline.net/blog/2009/09/15/iframes-onload-and-documentdomain/

    Allan
This discussion has been closed.