0

I have been working on an application that uses a different calendar plugin. The plugin is named CLNDR url: http://kylestetz.github.io/CLNDR/

Now I have created a dynamic solution calling to PHP /api/agenda/getAllEvents and jQuery keeps filling my console with the following error:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

$.ajax({
        url:'/api/agenda/getAllEvents',
        dataType:'JSON',
        async:false,
        success:function(obj){
            return eventArray = obj;
        }
    });

I don't get this error when i remove the async:false segment from the code only my eventArray that I return stays null / empty as object. When async is added I get the result but with the error message above.

What did I miss at this stage?

P070
  • 189
  • 1
  • 1
  • 10
  • First, this is not an `error`, but a `warning`... And look here for explanations: http://stackoverflow.com/a/27736383/2159528 – Louys Patrice Bessette Apr 01 '17 at 17:59
  • Thank you for this link - I will have a look into the explanations to find a way to ommit these warnings. Thanks again. – P070 Apr 01 '17 at 18:04
  • I had it a couple time ago... A I remember that I just putted the ajax request within a `setTimeout`... I it executes a couple milliseconds after page has fully loaded. Then, no warning. – Louys Patrice Bessette Apr 01 '17 at 18:06

0 Answers0