Im developing an web app. Here I created a popup-window in JavaScript. Now I like to create inside this window a weather-forecast.
What is the easiest way to do this?
I did it like here: Get weather from Yahoo with jQuery
$(".popup-button").click(function(evt){
//prevent default link behavior
evt.preventDefault();
//get id from clicked element
var id = $(this).attr("id");
switch (id) {
case "popup-button-wetter":
//centering with css
centerPopup($("#popup-wrapper-wetter"));
//load popup
loadPopupadditional($("#popup-wrapper-wetter"));
//get weather
getWeather ()
break;
......
function getWeather () {
$.get("http://weather.yahooapis.com/forecastrss?w=782458&u=c", function(data){
console.log("Data Loaded: " + data);
});
}
});
but then I got this error:
XMLHttpRequest cannot load http://weather.yahooapis.com/forecastrss?w=782458&u=c. Origin file:// is not allowed by Access-Control-Allow-Origin.
What does it mean?