bonsoir,
pour un projet que je développe actuellement, je fais appel à une fonction ajax.
voici une version abrégée de mon code :
ce code est sensé me retourner un xml de weather.com.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 (function( $, undefined ) { $.widget("ui.meteo", { ... _create: function() { $.ajax({ url: 'http://xoap.weather.com/weather/local/FRXX0085?cc=*&dayf=10&prod=xoap&unit=m&par=1050532020&key=133aa3f76734eadf', success: function(data) { alert(data); } }); }, }); }( jQuery ));
voici l'erreur que j'obtiens sous chrome :
Je ne comprends pas où est le problème :/XMLHttpRequest cannot load http://xoap.weather.com/weather/loca...3aa3f76734eadf. Origin null is not allowed by Access-Control-Allow-Origin.
Failed to load resource
pourriez-vous m'aider svp ?
Partager