table tools button not working can any one help (pdf alone is enough)
table tools button not working can any one help (pdf alone is enough)
gutz
Posts: 2Questions: 0Answers: 0
my header file follow.. im just using a static table in body...its just a html page if it suceed ill go with python..thanks in advance
/* Formatted numbers sorting */
$.fn.dataTableExt.oSort['formatted-num-asc'] = function(x,y){
x = parseInt( x.replace(/[^\d\-\.\/]/g,'') );
y = parseInt( y.replace(/[^\d\-\.\/]/g,'') );
return x - y;
}
$.fn.dataTableExt.oSort['formatted-num-desc'] = function(x,y){
x = parseInt( x.replace(/[^\d\-\.\/]/g,'') );
y = parseInt( y.replace(/[^\d\-\.\/]/g,'') );
return y - x;
}
/* Initialisation */
$(document).ready(function() {
$('#example').dataTable( {
"sPaginationType": "full_numbers",
"aoColumnDefs": [ {
"sType": "formatted-num",
"aTargets": [1,2,3,4,5] } ],
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"aButtons": [
"copy",
"csv",
"xls",
{
"sExtends": "pdf",
"sPdfOrientation": "landscape",
"sPdfMessage": "Your custom message would go here."
},
"print"
]
}
} );
} );
(function(){
var bsa = document.createElement('script');
bsa.type = 'text/javascript';
bsa.async = true;
bsa.src = '//s3.buysellads.com/ac/bsa.js';
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(bsa);
})();
any one pls help
/* Formatted numbers sorting */
$.fn.dataTableExt.oSort['formatted-num-asc'] = function(x,y){
x = parseInt( x.replace(/[^\d\-\.\/]/g,'') );
y = parseInt( y.replace(/[^\d\-\.\/]/g,'') );
return x - y;
}
$.fn.dataTableExt.oSort['formatted-num-desc'] = function(x,y){
x = parseInt( x.replace(/[^\d\-\.\/]/g,'') );
y = parseInt( y.replace(/[^\d\-\.\/]/g,'') );
return y - x;
}
/* Initialisation */
$(document).ready(function() {
$('#example').dataTable( {
"sPaginationType": "full_numbers",
"aoColumnDefs": [ {
"sType": "formatted-num",
"aTargets": [1,2,3,4,5] } ],
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"aButtons": [
"copy",
"csv",
"xls",
{
"sExtends": "pdf",
"sPdfOrientation": "landscape",
"sPdfMessage": "Your custom message would go here."
},
"print"
]
}
} );
} );
(function(){
var bsa = document.createElement('script');
bsa.type = 'text/javascript';
bsa.async = true;
bsa.src = '//s3.buysellads.com/ac/bsa.js';
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(bsa);
})();
any one pls help
This discussion has been closed.
Replies
I'm assuming that you have copied your source and try to test on local machine,
instead try to host it on a web server and all will be fine.
this cost me about 2 days but finally I hosted it it just works fine
this cause a security problem in flash which shows no error in the console.
hope you had the solution for your problem.
Thanks for ur reply i made it work on my local machine itself.. the only mistake i done was not giving the permission to my adobe flash player.. u can change the settings in below url..
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
wait for some seconds a flash will load on screen and there will be three radio buttons..pls select always allow then you can able to download pdf....
once again a big thanks to you.....