Internet Exporer returns Error when Sort/Filter/Pagination
Internet Exporer returns Error when Sort/Filter/Pagination
Firefox works fine, but when i call any sorting/filtering/pagination on the datatable (ajax processing) on IE it just says 'Processing..' and the browser generates an error message that says:
[code]
Message: 'undefined' is null or not an object
Line: 38
Char: 280
Code: 0
URI: .... jquery.dataTables.min.js
[/code]
Here is Line 38 in the .js file:
[code]
this.iCookieDuration=7200;
this.sCookiePrefix="SpryMedia_DataTables_";
this.fnCookieCallback=null;
this.aoStateSave=[];
this.aoStateLoad=[];
this.sAjaxSource=this.oLoadedState=null;
this.sAjaxDataProp="aaData";
this.bAjaxDataGet=true;
this.jqXHR=null;
this.fnServerData=function(a,b,c,d){d.jqXHR=i.ajax({url:a,data:b,success:c,dataType:"json",cache:false,error:function(f,e){e=="parsererror"&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})};
[/code]
This is Character 280:
[code]
this.fnServerData //Line 10 in the code example shown above.
[/code]
I do not have fnServerData in my script, and it works fine without it as does the example shown on this site.. and I have seen the 'DataTables warning:' message, and this is specifically when the JSON response is invalid. However, the error I'm getting in IE is just a frozen browser (stuck on saying 'processing...') and an error being returned. The JSON is valid as per jsonlint.com .
This is only happening in IE, firefox updates the datatable just fine when sorting/filtering/searching using ajax response..
Here is My Initializing code that works in FF:
[code]
$(document).ready(function() {
$('#grid').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/ajaxsp.asp",
"sPaginationType": "full_numbers",
"iDisplayLength": 10 ,
"bJQueryUI": true,
"bStateSave": true,
"bFilter": true
} ).columnFilter();
});
[/code]
[code]
Message: 'undefined' is null or not an object
Line: 38
Char: 280
Code: 0
URI: .... jquery.dataTables.min.js
[/code]
Here is Line 38 in the .js file:
[code]
this.iCookieDuration=7200;
this.sCookiePrefix="SpryMedia_DataTables_";
this.fnCookieCallback=null;
this.aoStateSave=[];
this.aoStateLoad=[];
this.sAjaxSource=this.oLoadedState=null;
this.sAjaxDataProp="aaData";
this.bAjaxDataGet=true;
this.jqXHR=null;
this.fnServerData=function(a,b,c,d){d.jqXHR=i.ajax({url:a,data:b,success:c,dataType:"json",cache:false,error:function(f,e){e=="parsererror"&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})};
[/code]
This is Character 280:
[code]
this.fnServerData //Line 10 in the code example shown above.
[/code]
I do not have fnServerData in my script, and it works fine without it as does the example shown on this site.. and I have seen the 'DataTables warning:' message, and this is specifically when the JSON response is invalid. However, the error I'm getting in IE is just a frozen browser (stuck on saying 'processing...') and an error being returned. The JSON is valid as per jsonlint.com .
This is only happening in IE, firefox updates the datatable just fine when sorting/filtering/searching using ajax response..
Here is My Initializing code that works in FF:
[code]
$(document).ready(function() {
$('#grid').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/ajaxsp.asp",
"sPaginationType": "full_numbers",
"iDisplayLength": 10 ,
"bJQueryUI": true,
"bStateSave": true,
"bFilter": true
} ).columnFilter();
});
[/code]
This discussion has been closed.
Replies
Thanks for the information - could you show us an example of the JSON response please? Also, if you could link your site showing this issue, that would be extremely helpful.
Failing that, I'd suggest a couple of things to get some more information. First, make sure you are using the latest 1.8.2 development version (available as the nightly on the downloads page: http://datatables.net/download ), and also try using the unminified version for debugging, since the min version is a bit of a nightmare to follow through the code :-)
Thanks,
Allan