ajax source

ajax source

bear331bear331 Posts: 1Questions: 1Answers: 0

Hi -- what if I have a url that hands back json data? Does the ajax: ..., field have to be a static json file? I'm having a hard time debugging this because I don't know what's going on behind the scenes.
Thanks.

Answers

  • allanallan Posts: 63,075Questions: 1Answers: 10,384 Site admin

    Does the ajax: ..., field have to be a static json file?

    No. It just need to return JSON. It doesn't need to be static - DataTables doesn't care if the JSON has been generated by two year olds playing with cars (indeed it wouldn't know) - it just needs valid JSON.

    The whole point of giving the ajax option to DataTables is that it points to a URL that will return valid JSON.

    If you have having problems with it, link to the page and we can take a look at what is happening.

    Allan

This discussion has been closed.