How can customize the Processing dialog that is shown when AJAX source is used

How can customize the Processing dialog that is shown when AJAX source is used

mrezairmrezair Posts: 4Questions: 0Answers: 0
edited August 2011 in General
Say I want to show a jquery dialog box instead of the default one? Is there a call-back function?

Thanks,
Reza

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    No there isn't - but the default can be modified through CSS and the language string (into which you can put HTML if you want to increase styling options). The CSS selector you want is div. dataTables_processing {}, and the language string is http://datatables.net/ref#oLanguage.sProcessing

    Allan
  • mrezairmrezair Posts: 4Questions: 0Answers: 0
    Thanks Allan,

    I think this will be a good idea though. The problem is say when user is viewing 100 rows, then this processing dialog goes at the bottom of the page and user will not see that at all. I want to make the screen dimmer while processing.

    Reza
  • mrezairmrezair Posts: 4Questions: 0Answers: 0
    One more question,

    How can I customize "Show entries" ? I want to remove the word "entries".

    Could not find any configuration. Then tried JavaScript. It removes the word, but then I guess it detaches the select object from its event handlers. The problem is that the drop-down and the words: show ... entries are in one label element and if I want to change the text, I have to re-create drop down too.

    Thanks for your help.
  • mrezairmrezair Posts: 4Questions: 0Answers: 0
    I found it Allan,

    It was in the oLanguage as in

    ,"oLanguage": {"sLengthMenu": "Show _MENU_"}

    I put it here for others to find it.

    Thanks again
  • norbert45frnorbert45fr Posts: 1Questions: 0Answers: 0
    Awesome plug-in Allan. Thanks for the hard work here.

    Just want to add a little note here regarding processing message, even if this tread is a bit old. This may help other in the future.

    I have found that we can put html code in the sProcessing string. With Firebug just check the css format to overwrite what is not necessary and store your html processing message in oLanguage table.
    Here is my example
    [code]"sProcessing": ""[/code]

    ajax-loader.gif is my waiting message aka company logo + progress bar and myWaitingMessage is a css definition to put the image at the correct place.

    and it works...
This discussion has been closed.