I'm creating a reset password page and when i try to submit the data to the backend through ajax call, it always returns to the error function. And when i'm trying to print the error, it is not showing me any error.
$.ajax({
url: "php file url",
method: "GET",
data: {
"action":1,
"email":email
},
success:function(data){
},
error:function(){
close_loader();
show_snack("Problem!!! Try again later...");
}
});
It never gets to the success function... I'm getting this -
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at the url. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).