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

omg
  • 136,412
  • 142
  • 288
  • 348
  • Maybe if one frame tries to read the contents (or location) of another frame from a different domain, you get a permission denied. – pts May 23 '09 at 21:21

4 Answers4

5

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
  • 92,731
  • 24
  • 156
  • 164
1

Hi I've answered a similar question

why/where the error “Permission denied for to call method Location.toString”.

This is caused by firebug showing errors from other windows in your console. In short, these errors will probably be nothing to do with your code at all.

If you want to test this theory, you can close all other windows in firebug, clear your console and test just your site.

Community
  • 1
  • 1
Doga
  • 281
  • 2
  • 11
  • The given link is broken. – user1205577 Sep 29 '14 at 17:59
  • it seems if you click on the first portion of the link it takes you to the correct stackoverflow thread, if you click on the second portion after http:// it links to ad.yieldmanager.com – Doga Sep 30 '14 at 17:09
1

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
  • 19,103
  • 12
  • 80
  • 106
0

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
  • 8,018
  • 9
  • 64
  • 107