Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#3898 closed bug (duplicate)

jQuery 1.3 cross-domain iframe bug

Reported by: shadedecho Owned by: john
Priority: undecided Milestone: 1.3.1
Component: unfiled Version: 1.3
Keywords: iframe crossdomain Cc:
Blocked by: Blocking:


I've run into a major problem with jQuery 1.3, but it is only happening with IE7 (not FF3). I have CompanionJS/DebugBar installed on IE, and it catches the errors. I've attached a screenshot showing the errors.

When I load the core library into an iframe with a different URL than the parent page, I get "Access is denied" and other javascript errors. Apparently, the jQuery object fails to get defined as part of the "Access..." error and then other errors cascade from that.

I've got a simple test which basically does nothing but load up the jQuery library into such an iframe. The exact same page can be accessed via two different domains, but the iframe is hardcoded to one of the two domains. So, when the parent page domain is the same as the iframe, jQuery loads fine. But when you create a cross-domain situation, errors ensue (no code changes, just different page domain).

http://flxhr.flensed.com/code/dev-tests/test-jquery-iframe.html (works, because the domains match)

http://www.flensed.com/code/dev-tests/test-jquery-iframe.html (fails with errors)

Attachments (1)

jquery-iframe-errors.png (30.7 KB) - added by shadedecho 14 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by shadedecho

Attachment: jquery-iframe-errors.png added

comment:1 Changed 14 years ago by dmethvin

Your test page also fails in the same location on IE8 beta 2. Could you use the uncompressed jQuery 1.3 on those pages to see if that changes anything? At the very least it would make it easier to use the IE8 debugger. :-)

comment:2 Changed 14 years ago by dmethvin

Owner: set to john

It appears that #3880 is reporting a potential fix for this test case.

comment:3 Changed 14 years ago by john

Resolution: duplicate
Status: newclosed

Yeah, this looks like a duplicate of #3880. I'll apply the fix over there and hope it fixes the problem.

comment:4 Changed 14 years ago by shadedecho

I patched my copy of jQuery 1.3 (both the compressed and src versions) with the SVN6120 patch, and re-tested, and indeed the issue is resolved. Thanks for the quick fix!

Can/will this bug make it into the release notes or some other documented place so others that I have who I recommend for jQuery upgrade will know about this problem?

Note: See TracTickets for help on using tickets.