No ‘Access-Control-Allow-Origin’ header is present on the requested…

No ‘Access-Control-Allow-Origin’ header is present on the requested …

XMLHttpRequest cannot request ressources on domains that are different from the one of your current domain

One way you could try to get around it is to use JSONP.

JSONP : JSON with padding,  is used to request data from a server residing in a different domain than the client. This enables sharing of data bypassing same-origin policy.

 

while making ajax call you can user “crossDomain:true,”

 

$.ajax({    
    type: "GET",
    crossDomain:true,
    url: "http://api.examconnect.com//getresult.json",
    dataType: "jsonp",
    success: function(e) {
    }
});
Updated: May 1, 2017 — 5:51 PM

Leave a Reply

Your email address will not be published. Required fields are marked *

2 + 8 =


Tech Contents © 2016
Inline
Inline