I have been reading about this jsonp method and i just don't get it and i dont know what to fix.
here's my code
$(document).ready(function() {
$.getJSON( 'http://nutri.de.imerchmedia.com/services/accounts', function(data ) {
$('#select').append("<option value='0' name='idsel'>Select Outlet</option>");
console.log(data);
$.each(data, function (i, item) {
$('#select').append("<option value='" + item.outlet_group_id + "'>" +
item.outlet_group_name + " : " + item.outlet_group_code + "</option>");
});
});
});
I hope someone could help me, it's been 2days >.<
and if i use this
var url = "http://nutri.de.imerchmedia.com/services/accounts";
$.ajax({
url: url,
type: 'GET',
dataType: "jsonp",
success: function(data){
console.log(data);
}
});
i always get this Resource interpreted as Script but transferred with MIME type text/html: "http://nutri.de.imerchmedia.com/services/accounts?callback=jQuery1102006321510183624923_1380442924579&_=1380442924580".