Customizing the "Processing.." message
Customizing the "Processing.." message
I am trying to customize the datatable's "Processing.." message ("bProcessing": true) while the large data is rendering. Is there any way I can call another javascript function instead of "Processing..." message when the user click on the pagination or sorting ? Also is it possible to show the datatables's "Processing.." message only for the filtering feature?
Thank you in advance!
Fitsum
Thank you in advance!
Fitsum
This discussion has been closed.
Replies
http://datatables.net/ref
[code]
$(document).ready(function() {
$('#example').dataTable( {
"oLanguage": {
"sProcessing": "DataTables is currently busy"
}
} );
} );
[/code]
$(document).ready(function() {
$('#example').dataTable( {
"oLanguage": {
"sProcessing": showMessage()
}
} );
} );
I have a custom javascript function (i.e. showMessage()) that show different message with overlay.
Probably your best bet are the fnPreDrawCallback and fnDrawCallback, since they happen before and after a table draw/refresh
[code]
$(document).ready(function() {
$('#example').dataTable( {
"fnPreDrawCallback": function() {
// gather info to compose a message
showMessage(...);
},
"fnDrawCallback": function() {
// in case your overlay needs to be put away automatically you can put it here
hideOverlay();
}
} );
} );
[/code]
$(document).ready(function() {
$('#example').dataTable( {
"fnPreDrawCallback": function() {
showMessage();
},
"fnDrawCallback": function() {
hideMessage();
}
} );
} );
[code]
$(document).ready(function() {
$('#example').dataTable( {
"fnPreDrawCallback": function() {
// gather info to compose a message
showMessage();
return true;
},
"fnDrawCallback": function() {
// in case your overlay needs to be put away automatically you can put it here
hideOverlay();
}
} );
} );
[/code]
Thanks,
Fitsum
Fitsum