I want to send a cross domain ajax request but I am getting below error for this I have also tried the below code which I have got from the one stack article is it possible to send a cross domain request or not.
Code which I have tried for sending cross domain request.
$(document).ready(function () {
$.ajax({
type: 'POST',
url: "http://testdomain.com/config.php",
crossDomain: true,
data: 'rejected_by_loid=' + 1,
success: function (msg) {
$('#survey').html(msg);
}
});
});
Error on console log:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://beta.paravey.com/paraveyads/config.php. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Please help me to solve this problem.