在响应式DataTable上获取未捕获的ReferenceError错误

时间:2022-05-03 13:36:44

I was using Resposive DataTables perfectly but is just starts putting out an error of:

我正在使用Resposive DataTables,但刚刚开始发出错误:

Uncaught ReferenceError: e is not defined

未捕获的ReferenceError:未定义e

which I click on + sign!

我点击+符号!

I google this but wasn't able to find any thing for that! Can you please let me know what might cause this issue! 在响应式DataTable上获取未捕获的ReferenceError错误

我谷歌这个,但无法找到任何东西!能告诉我可能导致这个问题的原因吗?

Update

var allDataTbl = $('#all-data-tbl').DataTable( {
        bFilter: false,
        dom: 'Bfrtip',
       buttons: [  
    'copy', 
    {
       extend: 'excel', 
       title: 'BC Run of River Decision Support Tool'
    },
    {
       extend: 'csv', 
       title: 'BC Run of River Decision Support Tool'
    }
]
    } );

 request.done(function(mapInfo) {
                    var arr = [];
                    $.each(mapInfo, function(i,v) {
                            arr.push($.map(v, function(v1) {
                            return v1;
                        }));
                    });
                    allDataTbl.clear().rows.add(arr).draw();


 )};

1 个解决方案

#1


0  

If you can provide the source code for what happens when clicking on that "+", it would be helpful.

如果您可以提供单击“+”时所发生情况的源代码,那将会很有帮助。

It looks like your error variable "e" cannot be accessed in its scope or its not declared anywhere. If it is defined, it can only be accessed in its own scope. If you want a variable to be accessible globally, you can remove the "var" keyword although that is not recommended.

看起来您的错误变量“e”无法在其范围内访问,或者未在任何地方声明。如果已定义,则只能在其自己的范围内访问。如果您希望全局访问变量,则可以删除“var”关键字,但不建议这样做。

Go to your "dataTables.responsive.js" file and search for all the instances of "e".

转到“dataTables.responsive.js”文件并搜索“e”的所有实例。

#1


0  

If you can provide the source code for what happens when clicking on that "+", it would be helpful.

如果您可以提供单击“+”时所发生情况的源代码,那将会很有帮助。

It looks like your error variable "e" cannot be accessed in its scope or its not declared anywhere. If it is defined, it can only be accessed in its own scope. If you want a variable to be accessible globally, you can remove the "var" keyword although that is not recommended.

看起来您的错误变量“e”无法在其范围内访问,或者未在任何地方声明。如果已定义,则只能在其自己的范围内访问。如果您希望全局访问变量,则可以删除“var”关键字,但不建议这样做。

Go to your "dataTables.responsive.js" file and search for all the instances of "e".

转到“dataTables.responsive.js”文件并搜索“e”的所有实例。