Dynamic population of sAjaxSource and jquery.dataTables.js:1336Uncaught TypeError
Dynamic population of sAjaxSource and jquery.dataTables.js:1336Uncaught TypeError
_jthomas
Posts: 75Questions: 0Answers: 0
Hi Allan,
When I dynamically populate "sAjaxSource": by calling the function oTable.fnReloadAjax("history/" + customerID + ".txt"); I am receiving the error described below in the code. The data gets loaded and is searchable despite this error. However, functions like the following are never invoked after this error. Please advise
$('#searches', this).change( function () {
if( "none" != $(this).val() )
location.href = $(this).val();
}) ;
[code]
/*
* Variable: fnServerData
* Purpose: Function to get the server-side data - can be overruled by the developer
* Scope: jQuery.dataTable.classSettings
*/
this.fnServerData = function ( url, data, callback, settings ) {
settings.jqXHR = $.ajax( {
jquery.dataTables.js:1336Uncaught TypeError: Cannot set property 'jqXHR' of undefined
"url": url,
"data": data,
"success": callback,
"dataType": "json",
"cache": false,
"error": function (xhr, error, thrown) {
if ( error == "parsererror" ) {
alert( "DataTables warning: JSON data from server could not be parsed. "+
"This is caused by a JSON formatting error." );
}
}
} );
};
[/code]
When I dynamically populate "sAjaxSource": by calling the function oTable.fnReloadAjax("history/" + customerID + ".txt"); I am receiving the error described below in the code. The data gets loaded and is searchable despite this error. However, functions like the following are never invoked after this error. Please advise
$('#searches', this).change( function () {
if( "none" != $(this).val() )
location.href = $(this).val();
}) ;
[code]
/*
* Variable: fnServerData
* Purpose: Function to get the server-side data - can be overruled by the developer
* Scope: jQuery.dataTable.classSettings
*/
this.fnServerData = function ( url, data, callback, settings ) {
settings.jqXHR = $.ajax( {
jquery.dataTables.js:1336Uncaught TypeError: Cannot set property 'jqXHR' of undefined
"url": url,
"data": data,
"success": callback,
"dataType": "json",
"cache": false,
"error": function (xhr, error, thrown) {
if ( error == "parsererror" ) {
alert( "DataTables warning: JSON data from server could not be parsed. "+
"This is caused by a JSON formatting error." );
}
}
} );
};
[/code]
This discussion has been closed.
Replies
Allan
I may be looking at the wrong location - could you point me to the right location for the 1.8 fnReloadAjax plugin? thanks very much!!!