sDom with additional div and not empty oLanguage.sUrl

sDom with additional div and not empty oLanguage.sUrl

MishaKMishaK Posts: 12Questions: 0Answers: 1
edited May 2013 in General
Hi. sorry for bad and strange English.

I have [code]"sDom": '<"H"lf>rt<"F"ip><"toolBar">' [/code]
When I set oLanguage sub-params in code [code]"sLengthMenu": "_MENU_",[/code] , div with class toolBar created just after footer, and when later i use [code]$(".toolBar").append($( "#toolBar" )) [/code]- all OK.
but if i use [code]"sUrl": "js/us.txt"[/code] , div with class toolBar created just after footer, and div with id #toolBar created in other place
i.e. [code]$(".toolBar").append($( "#toolBar" ))[/code] not working.
as i understood in moment of execution $(".toolBar").append($( "#toolBar" )) there are not exists div with class toolbar and imposible append #toolbar to nothing.

Replies

  • MishaKMishaK Posts: 12Questions: 0Answers: 1
    i have created http://live.datatables.net/uyaxem/2/
    if remark [code]"sUrl": "http://www.datatables.net/release-datatables/examples/examples_support/de_DE.txt"[/code] - div.toolbar OK
    if not remark - div.toolbar are NOT exists
  • MishaKMishaK Posts: 12Questions: 0Answers: 1
    edited May 2013
    not about this topic, but for today's compiled from github

    1. in function _fnUpdateInfo may be right is [code]out = total ? lang.sInfo : lang.sInfoEmpty; [/code]
    2. in "fnFormatNumber": function ( toFormat ) { may be right
    [code]out = $(this).dataTableSettings[0].oLanguage.sInfoThousands + out; [/code]
  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Thanks for the link.

    Two things:

    1. There was a cross domain request, which the browser was blocking (although that might only have been in the `live` example.

    2. Use fnInitComplete when sUrl is used, since it requires an async Ajax load, so the DOM is not complete until fnInitComplete:
    http://live.datatables.net/uyaxem/3/edit

    Allan
This discussion has been closed.