CORS cross origin resource errors - Javascript/JQuery
Im encountering CORS cross origin errors when trying to perform a GET request to an API on another server. I'm fairly new to coding and am trying to build a vehicle registration lookup which gets data from another server. I presumed I could build this and preview it in dreamweaver before adding this feature to my website.
I tried XMLhttprequest, javascript and JQuery all receiving the same CORS errors Is there any way to get this to work in live preview. Below is an example of my script.
$.ajax({
url: $("#apicall").text,
type: "GET",
crossdomain: false,
datatype: "jsonp",
success: function(data,textstatus,xhr){
$("#div1").load(data)
console.log(data);
},
Thanks in advance
