table tools custom link
table tools custom link
Hello everyone,
I have a menu which shows menu items to be selected, one of the menu item is to download data of table as excel.
The following is the excerpt of code to have excel table tool button as hidden and appended to "hiddenTool" div.
(I could see the excel button and embed swf inside the hidden div).
"sDom": '<"#table_header"<"#inner_table_header"<"filtertx">fCT<"filterbtn">>>tipl',
"oTableTools": {
"aButtons": [{"sExtends": "xls", "sButtonText":"xls","mColumns": "visible",
"fnInit":function(nButton,oConfig)
{
//console.log($('embed'));
}
}],
"sSwfPath": "<%=request.getContextPath()%>/merlin/js/swf/copy_cvs_xls_pdf.swf"
},
"fnInitComplete":function() {
$('.ColVis').appendTo("#toolButton");
$("#more_action").css("margin","0");
$('.DTTT_container').appendTo("#hiddenTool");
$('button.DTTT_button').css("border","1px solid #7EA69E!important");
$(".ColVis_Button").attr("id","addRemoveBtn");
$('.DTTT_container').css('left',0);
$('.DTTT_container').css('position','absolute');
$('.DTTT_container').css('top',0);
$('.ColVis').css('display','none');
$('#selectAll').css('margin-right','-8px');
eTime=new Date().getTime();
loadTime=(eTime-sTime);
}
Question: Now, I have a simple link and on click of the link I am triggering the following code.
function rollover() {
$( "#ToolTables_example_0" ).trigger( "fnClick"); // tried but not working
$( "#ToolTables_example_0" ).trigger( "click"); // tried but not working
$( ".DTTT_button_xls" ).trigger( "click"); // tried but not working
$( ".DTTT_button_xls" ).trigger( "fnClick"); // tried but not working
}
The above function is getting called BUT not triggering the excel button click so that it would open file system window to save the file.
In simple words, how to invoke fnClick of a table tool button on a custom link.
I really appreciate any ideas or inputs on this.
Thank you,
Sri
I have a menu which shows menu items to be selected, one of the menu item is to download data of table as excel.
The following is the excerpt of code to have excel table tool button as hidden and appended to "hiddenTool" div.
(I could see the excel button and embed swf inside the hidden div).
"sDom": '<"#table_header"<"#inner_table_header"<"filtertx">fCT<"filterbtn">>>tipl',
"oTableTools": {
"aButtons": [{"sExtends": "xls", "sButtonText":"xls","mColumns": "visible",
"fnInit":function(nButton,oConfig)
{
//console.log($('embed'));
}
}],
"sSwfPath": "<%=request.getContextPath()%>/merlin/js/swf/copy_cvs_xls_pdf.swf"
},
"fnInitComplete":function() {
$('.ColVis').appendTo("#toolButton");
$("#more_action").css("margin","0");
$('.DTTT_container').appendTo("#hiddenTool");
$('button.DTTT_button').css("border","1px solid #7EA69E!important");
$(".ColVis_Button").attr("id","addRemoveBtn");
$('.DTTT_container').css('left',0);
$('.DTTT_container').css('position','absolute');
$('.DTTT_container').css('top',0);
$('.ColVis').css('display','none');
$('#selectAll').css('margin-right','-8px');
eTime=new Date().getTime();
loadTime=(eTime-sTime);
}
Question: Now, I have a simple link and on click of the link I am triggering the following code.
function rollover() {
$( "#ToolTables_example_0" ).trigger( "fnClick"); // tried but not working
$( "#ToolTables_example_0" ).trigger( "click"); // tried but not working
$( ".DTTT_button_xls" ).trigger( "click"); // tried but not working
$( ".DTTT_button_xls" ).trigger( "fnClick"); // tried but not working
}
The above function is getting called BUT not triggering the excel button click so that it would open file system window to save the file.
In simple words, how to invoke fnClick of a table tool button on a custom link.
I really appreciate any ideas or inputs on this.
Thank you,
Sri
This discussion has been closed.
Replies
Allan