I want to pass the variable to mColumns attributes instead of [0, 1, 2, 3,4,5,6,7,8,9] , Here is my code :
$(function() {
var table=$('#MSRRes').dataTable
( {
"oTableTools":
{
"sSwfPath": "swf/copy_csv_xls_pdf.swf",
"aButtons": [
{
"sExtends": "csv",
"mColumns": [0, 1, 2, 3,4,5,6,7,8,9],
"sAction": "flash_save"
}
]
}
});
});
You mean like this?
var someArray=[0, 1, 2, 3,4,5,6,7,8,9];
(function() {
var table=$('#MSRRes').dataTable ( {
"oTableTools":
{
"sSwfPath": "swf/copy_csv_xls_pdf.swf",
"aButtons": [
{
"sExtends": "csv",
"mColumns": someArray,
"sAction": "flash_save"
}
]
}
});
});
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments