Error :
Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost:8080, *', but only one is allowed. Origin 'http://localhost:8080' is therefore not allowed access.
$("#selector3").autocomplete({
source: function(request, response) {
$.ajax({
url: "http://example.com/"+$("#selector3").val(),
type: "GET",
dataType: "json",
data: request,
processData: true,
data: {},
headers: {
"Access-Control-Allow-Origin" : "*",
"Access-Control-Allow-Headers": "origin, content-type, accept"
},
crossDomain: true,
success: function(data) {
alert(data.Company_Id);
});