Post Ajax outside the same Project

0

Error:

XMLHttpRequest cannot load http://localhost/appread/Post.php. 
Response for preflight is invalid (redirect)

Ajax code:

 $('#btn-sinc').click(function(){

    $.ajax({
          type: "POST",
          url: 'http://localhost/appread/Post.php',
          data: "cliente="+ClienteStorage,
          contentType: "application/json; charset=utf-8",
          dataType: 'json',
          success: function (data){
              alert('Dado Enviado');
          }

    });

});

I'm pretty sure the code is not quite right. If anyone can lend a hand, I appreciate it.

    
asked by anonymous 20.10.2016 / 20:43

0 answers