tags:

views:

1874

answers:

3

I'm using YUI,

and sometimes I'll see this "Permission denied to call method Location.toString" error,

It's reported in connection.js,

I didn't find any clue why this error occur yet.

Very strange

+1  A: 

If the script is executed from a different domain, or you are trying to access the contents of a frame/window/iframe of a different domain, you will see this error. Safari's behavior was a little different, at least in the v1-2 era (iirc), so you will probably want to test in that as well.

If you are including scripts via a different domain, you need to make sure your actual triggers/events are tied in and executed from inline scripts, or from a script file loaded from the same domain as your html for best results.

Tracker1
A: 

Hi Shore.

Are you seeing this in Firebug, by any chance?

I'm getting the same thing in Firefox, off-and-on, after adding jQuery to my site. I'm calling the jQuery js from another site (different domain completely), which I figure isn't much different than calling it from Google's servers.

I have no code using jQuery at all as of the moment. And, while Firebug reports this as an error, it doesn't do so all the time. While I have it turned on, I'm seeing no errors in IE.

While there are different libraries involved, my guess is that Firebug is generating a false-positive.

Now if you're not using Firebug when you see this ... are you using YUI hosted on your own server? What browser are you using? Etcetera.

~James

James Skemp
A: 

If you are dealing with any Flash through a cross-domain iframe, then it is quite possible that you are seeing a bug in Adobe's Flash Player that occurs with FF2 and FF3.

The bug is in Adobe's public JIRA here: http://bugs.adobe.com/jira/browse/FP-561

There seems to be no motivation to get it fixed, unfortunately.

zombat