[英]DataTables warning: table id={id} - Invalid JSON response
I know above error is explain here " LINK " 我知道上面的错误是在这里解释“ 链接 ”
All is working fine in my local-host
thats no error popup , nothing in my local-host. 在我的local-host
一切正常,没有错误弹出窗口,在我的本地主机上什么也没有。
But on my online server i am getting above link error : i am not getting what and where is wrong as when i refresh my page after error then i get data properly . 但是在我的在线服务器上,我遇到了链接错误:我没有得到什么,哪里是错误的,因为当我在错误之后刷新页面时,我可以正确地获取数据。
It works for some time and then again start giving me error and again after refresh of page , error is not seen and my table list all data properly . 它工作了一段时间,然后再次开始给我错误,并在刷新页面后再次出现错误,没有看到错误并且我的表正确列出了所有数据。
I check my all MySQL query on my server its working properly and fine. 我在服务器上检查我所有的MySQL查询,它均正常运行。
var oTableL1 = $('#table1').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "includes/db/list_db.php",
"fnServerParams": function ( aoData ) {
aoData.push( { "name": "more_data", "value": "tablequeryone" } );
// aoData : passing parameter in my list_db.php where
i have used if else-if code for resp. which is working fine
in my local-host, also on server after refresh
}
});
var oTableL2 = $('#table2').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "includes/db/list_db.php",
"fnServerParams": function ( aoData ) {
aoData.push( { "name": "more_data", "value": "tablequerytwo" } );
}
});
var oTableL3 = $('#table3').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "includes/db/list_db.php",
"fnServerParams": function ( aoData ) {
aoData.push( { "name": "more_data", "value": "tablequerythree } );
}
});
ONLINE SERVER : IF I REFRESH MY PAGE then some time it get my data properly but some time its show me error , but after refresh of page it show me data properly without any error .. not getting what wrong. 在线服务器:如果我刷新我的页面,那么一段时间它会正确地获取我的数据,但有时它会向我显示错误,但是刷新页面后它将正确地向我显示数据,而没有任何错误..不会出错。
same thing is happening for search and pagination and records list . 搜索,分页和记录列表也发生了同样的事情。
Since you are getting output on random refresh it has to do with the data table initialization and assignment of data. 由于您是通过随机刷新获得输出的,因此它与数据表的初始化和数据分配有关。 There are multiple scenarios that can lead to above error; 有多种情况可能导致上述错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.