language setting bug?

language setting bug?

mehtimehti Posts: 35Questions: 13Answers: 0

Hi,

I have number of $ajax and $checkbox jqueries in the list one after another... they all work perfectly until I add the following line to my datatables

"language": {
"url": "../js/" + lang + ".dataTables.lang"
},

When I add this line all of the $ajax stop working except for the first one in the list... any ideas why?

This question has an accepted answers - jump to answer

Answers

  • mehtimehti Posts: 35Questions: 13Answers: 0
    edited October 2014

    fixed see below

  • mehtimehti Posts: 35Questions: 13Answers: 0

    fixed it by moving ajax calls into initComplete

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    Thanks for the link - you need to use initComplete. Using language.url makes the loading of the table async (since the language information has to be obtained by Ajax). If you drop the init of your JS controls into the callback function, that should help!

    Allan

This discussion has been closed.