[mapguide-users] Re: Scalebar: TypeError, Fusion Error, and NS_ERROR_DOM_INVALID_ACCESS_ERR

Berg, Leandros van den [FGSBV] L.vdBerg at fugro.nl
Fri Nov 11 07:21:50 EST 2011


OK. It's not due to the fact I'm adding the stylesheet as a link
element. I ruled that out by hardcoding the url in Scalebar.js.
Apparently, Firefox sees localhost and localhost:80 as different domains
and that's why it throws the NS_ERROR_DOM_SECURITY_ERR error. So I set
the url to 

http://localhost:80/mapguide/fusion/widgets/scalebar/scalebar-fancy.css

And this line doesn't thrown the NS_ERROR_DOM_SECURITY_ERR error

document.styleSheets[0].insertRule('@import url("'+url+'");',0);

Leandros


More information about the mapguide-users mailing list