background preloader

Bug

Facebook Twitter

Internet Explorer 6 & 7 document.domain bug - waelchatila.co. There are a couple workarounds.

Internet Explorer 6 & 7 document.domain bug - waelchatila.co

As mentioned above, this is a race conditions. While the iframe is being created and loaded, the document.domain is not explicitly set, so any parent document that does have it explicitly set will not be able to communicate with it immediately. The workaround I use the most often is to point the iframe (or frame, or window) src to a "blank" html page that includes the setting of the document.domain value, plus a callback call to top.parent.loadContent() where the parent (whoever created the iframe) has dfined loadContent() and that function reaches into the iframe to access or overwrite it with whatever it wants. The other workaround is a variation on that mentioned above, to create a setInterval loop that keeps checking to see if the frame is loaded. Internet Explorer 7 blocks cross-domain iframe to parent communi. A new security setting in Microsoft Internet Explorer 7 has been causing problems with requests between iframe and parent.

Internet Explorer 7 blocks cross-domain iframe to parent communi

There is a security setting in the Internet options called "Navigate sub-frames across different domains", which in IE6 was set to "Enabled" under Medium security, but is set to "Disabled" in IE7 by default. An example of the type of communication that is blocked is shown here: Bug 431819 – IMAP/POP/SMTP/LDAP with SSL client auth, Thunderbir.