I'm trying to submit a form via POST to a WebService
but I'm having the following problem:
In 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status 404.
I have already added CORS filters to the project with WebServices
.
This is my request:
$("#frmLogin").submit(function(e){
var postData = $(this).serializeArray();
var fUrl = $(this).attr("action");
$.ajax({
type: 'POST',
url: fUrl,
contentType: 'application/x-www-form-urlencoded',
xhrFields:{
withCredentials: false
},
crossDomain : true,
xhrFields: {
withCredentials: false
},
data: postData,
success: function(result){
alert('sucesso');
},
error: function(){
alert('erro');
}
});
});
Is there something missing in it?