Clear [loadingRecords] message when exception happen
Clear [loadingRecords] message when exception happen

Hi everyone,
Currently I'm customizing the error message that pops up when some exception happen in the errorMode extension as code below:
$.fn.dataTable.ext.errMode = function (settings, helpPage, message) {
Message.failMessage("My customized error message...");
};
But there is one thing I also would like to customize.
When loading data and an exception happen, the dataTable will show whatever is been set here
language: {
loadingRecords: "Please wait - loading..."
}
and the dataTable keeps showing this message even after clicking on the popup.
My question is, how can I clean this message or give another message when an exception happen?
is there such a property like
language: {
loadingRecordsError: "Sorry! Error loading data."
}
Thank you very much in advance guys!
Regards,
Alex
Replies
The example in the
processing
page may help - it's showing something similar.Colin
Hi Colin,
Thanks for your reply.
Actually the little popup processing is been hidden.
The problem is that after the processing indicator (popup) disappears, I still get this code
That is the message I'm trying to get rid off or perhaps replace it with a customized message if possible.
So, is it possible to replace the "Loading, please wait..." in case I get an error when dataTable is loading?
Thank you!
Regards,
Alex
"Loading, please wait..." isn't one of our messages, so it must've been customised already. You've probably got an option for
language.processing
,Colin
Sorry, meant to add, you can't modify it once set, but you can just change the text in hte DOM for that element if you detect an error.
Hi @colin ,
Thanks for your reply.
I end up solving the problem with code as follow:
Thank you very much for your help.
Let me know if you see any danger on this approach.
Thank you!
Regards,
Alex