Display Loading Message
Display Loading Message
OrangeJuice
Posts: 4Questions: 2Answers: 0
Hi
I'm attempting to display a default loading message but unable to do so. The code loads records using Ajax. My code is as:
//In loop.
$('#myDash').dataTable().fnAddData( [ oProj,oTitle ] );
//Later code
$(document).ready(function() {
$('#myDash').dataTable( {
paging: false,
searching: false,
"ajax": "json.txt",
"language": {
"loadingRecords": "Please wait - loading..."
}
} );
} );
Now the loading message show but error alerted, 'Datatable warning:table id = Please see http://datatables.net/tn/7'
The Network Analysis show a 404 error but have no idea on how to fix. Its something to do with the json.txt ?
Is there another way to show Loading message?
Thanks
This discussion has been closed.
Answers
It looks like it basically cant see json.txt, you should really use the absolute path
And format your code, please..
Hi
I used the following example, but there is no mention what json.txt is. I haven't installed this file anywhere, what needs to be done ? is it needed?
https://datatables.net/reference/option/language.loadingRecords
Lol.. json.txt is supposed to be the Path/URL to the JSON source... Read
ajax
.I guess its not labeled that the
ajax
value in the example is the url to the JSON, because thats about as obvious as it can possibly get.Hi
I don't think I need the json.txt section which I added for the loading message alone.
I am loading the array from a loop in an earlier process :
All I want to do is show a loading message, can I do this without the json.txt?