Wish List Item - No wait, BEGGING item!!!
Wish List Item - No wait, BEGGING item!!!
Allan - Please please PLEASE add Ajax error property for fnServerData handling. Thing is, you (your code) cannot possibly know what to do with all error conditions (some error conditions are in fact not errors - they're legitimate states).
You mentioned in another thread you might consider "abstracting this out" - or words to that effect. Mate, no offence, it's already there and dataTables is hiding it.
just my 0.02.
ruzz
You mentioned in another thread you might consider "abstracting this out" - or words to that effect. Mate, no offence, it's already there and dataTables is hiding it.
just my 0.02.
ruzz
This discussion has been closed.
Replies
[code]
this.fnServerData = function ( url, data, callback ) {
$.ajax( {
"url": url,
"data": data,
"success": callback,
"dataType": "json",
"cache": false,
"error": function () {
alert( "DataTables warning: JSON data from server failed to load or be parsed. "+
"This is most likely to be caused by a JSON formatting error." );
}
} );
};
[/code]
If you override fnServerData with your own function, then you are free to had whatever error handler you want.
Or am I missing something?
Allan
I was having trouble figuring out how to dig into $.getJSON and had not realised (or then even seen) an example using $.ajax - my bad. RTFM and all that ;)
But, FYI, I was referring to this thread: http://datatables.net/forums/comments.php?DiscussionID=1084
ruzz
Regards,
Allan