Skip to content

Instantly share code, notes, and snippets.

@jgdoncel
Created December 4, 2013 15:03
Show Gist options
  • Save jgdoncel/7788974 to your computer and use it in GitHub Desktop.
Save jgdoncel/7788974 to your computer and use it in GitHub Desktop.
Cambiar envío de peticiones jquery.datatables de GET a POST
"fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
// $.getJSON( sSource, aoData, function (json) {
// if(json.error == 'session_out'){
// document.location.href='index.php?msg=session_out';
// } else {
// fnCallback(json)
// }
// });
$.post(sSource, aoData, function(json) {
if(json.error == 'session_out'){
document.location.href='index.php?msg=session_out';
} else {
fnCallback(json)
}
}, "json");
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment