4

I have below code in jsp to create a dataTable. I am using bProcessing as true which displays the 'processing' indicator till i get the data from the server. I want to show the message as "loading data.." instead of 'processing'. I tried using sProcessing as suggested on various sites but it does not work?

      customersTable = $('cutomer').dataTable({
         "sAjaxSource": "ajax url",
         "bProcessing":true,
         "bDeferRender": true,
         "sServerMethod": "POST",
             "oLanguage": {
                "sProcessing": "loading data..."
              }
      });
2
  • What version of datatables are you using? Commented Dec 8, 2012 at 19:09
  • 1
    why do you have two , after the "sServerMethod": "POST" ? remove one of them... Commented Dec 9, 2012 at 7:56

2 Answers 2

6
 "oLanguage": {
          "sProcessing": "loading data..."
   } 

works for me and also suggested in dataTable Api's http://datatables.net/ref. Just check whether you are putting at right place. Otherwise you can also try fnPreDrawCallback and fnDrawCallback

Sign up to request clarification or add additional context in comments.

Comments

5

You could try sLoadingRecords instead of sProcessing, as sLoadingRecords deals with loading data, and sProcessing deals with datatables sorting/searching local data. Since you are using server side processing, I'm don't think sLoadingRecords will work for you, but it might actually change the text for you.. Let us know it it works for you.

Here's the info on sLoadingRecords from the DataTables website.

When using Ajax sourced data and during the first draw when DataTables is gathering the data, this message is shown in an empty row in the table to indicate to the end user the the data is being loaded. Note that this parameter is not used when loading data by server-side processing, just Ajax sourced data with client-side processing.

And for sProcessing

Text which is displayed when the table is processing a user action (usually a sort command or similar).

1 Comment

It does not work with "oLanguage": { "sLoadingRecords": "DataTables is currently busy" }. Also i am not using server side processing because by default bserverside is false

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.