TableTools problem with sSwfPath when loading page through Ajax
TableTools problem with sSwfPath when loading page through Ajax
Tobbe
Posts: 1Questions: 0Answers: 0
Hi,
I get a javascript error "Object Required" when I use IE7, but not in Firefox when I try to get a closer look with FireBug. It is an Intranet site so I cant do anything about the fact that IE7 is the browser being used for at least a couple of more years.
I use ASP.NET MVC2. The datatables are mostly situated in a web user control (.ascx) which is being loaded through jquery Ajax calls. I tried async=false and async=true and it makes no difference. It works the first time I load a Datatable with tabletools. The second time I call a datatable with tabletools I get the error. If I would call a page that has a datatable with tabletools the error does not occur, so it is only when I load the control through ajax. If I were to comment out the sSwfPath the error does not occur. The button will not work of course, but no error message is shown. Any help to what could cause this problem is appreciated.
[code]
var oTable = $('#dataTable').dataTable({
"bSort": true,
"bRetrieve": true,
"bSortClasses": false,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": '<"H"lfr>t<"F"iTp>',
"oTableTools": {
"sSwfPath": "/content/media/swf/copy_cvs_xls.swf",
"aButtons": [
"xls"
]
}
});
[/code]
/Tobbe
I get a javascript error "Object Required" when I use IE7, but not in Firefox when I try to get a closer look with FireBug. It is an Intranet site so I cant do anything about the fact that IE7 is the browser being used for at least a couple of more years.
I use ASP.NET MVC2. The datatables are mostly situated in a web user control (.ascx) which is being loaded through jquery Ajax calls. I tried async=false and async=true and it makes no difference. It works the first time I load a Datatable with tabletools. The second time I call a datatable with tabletools I get the error. If I would call a page that has a datatable with tabletools the error does not occur, so it is only when I load the control through ajax. If I were to comment out the sSwfPath the error does not occur. The button will not work of course, but no error message is shown. Any help to what could cause this problem is appreciated.
[code]
var oTable = $('#dataTable').dataTable({
"bSort": true,
"bRetrieve": true,
"bSortClasses": false,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": '<"H"lfr>t<"F"iTp>',
"oTableTools": {
"sSwfPath": "/content/media/swf/copy_cvs_xls.swf",
"aButtons": [
"xls"
]
}
});
[/code]
/Tobbe
This discussion has been closed.