I'm trying to do my first cross request with JSONP to get a banner from an external URL.
<script type="text/javascript">
function handleResponse(json){
var data = JSON.parse(json);
alert(data);
}
</script>
<script src="http://lujanventas.com/plugins/banners/?callback=handleResponse"></script>
This code I think it's a pretty basic JSONP request. My problem is that is that I get the error: "Resource interpreted as Script but transferred with MIME type text/html".
I haven't modified the file in any way to prepare it for the request. (I believe I must modify it somehow but have no idea what to do).
What must I do to get the file with no problems?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…