Is it possible to show loading.. message while not using AJAX

Is it possible to show loading.. message while not using AJAX

saisworldsaisworld Posts: 6Questions: 2Answers: 0

Currently, when I set the processing =true and ajax in datatable, its correctly showing me the "loading.." message in the table. However is it possible to show "loading .. " message when data fetching without using the Datatables ajax option?

Answers

  • kthorngrenkthorngren Posts: 21,315Questions: 26Answers: 4,948

    Use the processing() API.

    Kevin

  • saisworldsaisworld Posts: 6Questions: 2Answers: 0
    edited September 23

    I have tried by setting the processing: true but still its not working.

    Here is the test case - https://jsfiddle.net/etqfd19b/13/

  • kthorngrenkthorngren Posts: 21,315Questions: 26Answers: 4,948

    You need to first tun it on with table.processing(true). Updated test case:
    https://jsfiddle.net/pLhqavnd/

    Kevin

  • saisworldsaisworld Posts: 6Questions: 2Answers: 0

    Apologies, I think I wasn't clear in my initial question. Your change is just displaying a loading gif, I don't want the loading gif.

    I want to display the Loading text inside the dataTable while the server call is ongoing outside of datatable. Something like this

  • kthorngrenkthorngren Posts: 21,315Questions: 26Answers: 4,948

    That message can be changed with language.emptyTable. If the table ends up truly empty after you process to load the table the table won't display No data available in table.

    Kevin

Sign In or Register to comment.