Experiences with jsonp in Editor?
Experiences with jsonp in Editor?
Hi folks,
the following datatables example with jsonp support is working fine: https://datatables.net/examples/server_side/jsonp.html However when I try to implement editor with REST services via jsonp I can't get it to work. How should I configure my editor. Only add a dataType attribute to the ajax part? Or do I need to specify a success function as well?
Thanks in advance,
Christoph
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi Christoph,
Are you using the Editor PHP libraries? If so, you will need to do something like:
Also set the
dataType
option for theajax
object. And finally remember that JSONP only works with GET.Allan
Hi Allan,
the last point was the right one. Restricted JSONP to Get only so everything was fine. Gonna try out CORS later on.
Thank you, Christoph.
Sounds great - let me know how you get on with it!
Allan