Take the 2-minute tour ×

So, the error message is the security restriction to access a parent frame or window from within an (i)frame from a different domain.

(Unsafe javascript attempt to access frame with URL xxx from frame with URL yyy. Domains, protocols, and ports must match).

However, there is no line shown in webkit or chrome from where this error is generated.

So how do I get a list of the lines that infringe upon this? I know I can just search, but does this apply to cookies as well (document.cookie, etc) ? Is there a list of things that are disallowed?

Edit: Also, what do I need to use instead of $(window.top)?


share|improve this question
Set Firebug to break on errors. –  SLaks Nov 9 '11 at 18:37
@Slaks the errors are shown in chrome/safari - as far as I know, only firebug lite is available in these browsers. –  Wesley Nov 9 '11 at 18:41
Set Chrome to break on errors. –  SLaks Nov 9 '11 at 18:43
The purple/black Pause button on the bottom of the Script tab. –  SLaks Nov 9 '11 at 18:44
That should not be nearly so complicated. Look inside the call frames and try to figure out what jQuery is doing, or show me a demo. –  SLaks Nov 9 '11 at 19:17

2 Answers 2

up vote 0 down vote accepted

If you own all of the pages (the containing document and the iframe document) just stick some javascript in each of them to allow them to communicate happily:

document.domain = 'myDomain.com';
share|improve this answer

Any call from inside the frame to window instead of window.frames[my frame] will cause a violation unless you have the document.domain set to match the parent. https://developer.mozilla.org/en/DOM/document.domain

share|improve this answer

Your Answer


