I use JSONP to access to a json page (via jQuery). I have an html button
<input type="button" value="Récupérer les données" onclick="getInfo();" />
my Code
function getInfo() {
$.ajax({
dataType:'jsonp',
url: 'http://89.92.40.250:8010/dreamteam/interface/get_event_detail.php?id=106',
data: { param:'event' },
success:function(response) {
alert("Réponse : "+ response.data);
}
});
};
the alert doesn’t work…
That server doesn’t support JSONP, at least not with the standard
callbackparameter construct.Consider using a server-side solution to this problem.
BTW
Original question: Cannot access json file with javascript
Hello again, at SO you can edit your existing questions or engage with those who answer; you don’t have to ask another question with basically the same problem.