0

I have recently been building an overlay system for a display in my lobby. I am using the embed tag as follows:

    <embed src="flatly.theme/index.html" style="width:237px;height:344px;left:0px;top:0px;z-index:1;position:absolute;">

this is the error I have been getting:

    [Error] XMLHttpRequest cannot load http://xml.weather.yahoo.com/forecastrss/CAXX0504.xml. Origin null is not allowed by Access-Control-Allow-Origin.  (index.html, line 0)

If someone could explain to me why this is happening and how I can make it run fluently again, it would be great.

Thanks in advance

Brett

bret7600
  • 120
  • 1
  • 7

2 Answers2

1

.html file you a trying to use in <iframe> not supposed to be there.

Access-Control-Allow-Origin is part of Cross-origin resource sharing

is a mechanism that allows restricted resources (e.g. fonts, JavaScript, etc.) on a web page to be requested from another domain outside the domain from which the resource originated.1

And your domain is not allowed by xml.weather.yahoo.com

I believe this can sometimes happen for local html pages (file:///* ) And can be working as intended on any http server, even on http://localhost

it is explained in a lot of similar questions. JavaScript - XMLHttpRequest, Access-Control-Allow-Origin errors

Community
  • 1
  • 1
0

Your browser is detected cross domain request inside your "index.html" and block him

freethinker
  • 2,257
  • 4
  • 26
  • 49