admin管理员组

文章数量:1396739

I am working on a live ticker which works fine but when I am reloading the page I am running into this error:

XMLHttpRequest cannot load /ajax/ajax-liveticker.php due to access control checks.

Is there anything I can do to prevent this? I am pretty new to ajax.

setInterval(function () {
 $.ajax({
  processData: false,
  contentType: false,
  data: ajaxSendData,
  dataType: "json",
  error: function (xhr, ajaxOptions, thrownError) {
   console.log(xhr.status);
   console.log(thrownError);
    },
  type: "POST",
  url: "ajax/ajax-liveticker.php"
 }).done(function (data) {
  $("#liveticker").html(data.html)
 });
}, 5000);

本文标签: jqueryXMLHttpRequest cannot load due to access control checks when reloading the pageStack Overflow