I've spent probably a month researching the internet on this issue and have yet to find the answer to this. My code does the following (all Javascript).
Let's say I have a test.html on mydomain.com
Very first thing in head section i set document.domain = 'mydomain.com';
Then, dynamically create iframe, set src to "subdomain.mydomain.com/test2.html"
Append iframe to DOM
subdomain.mydomain.com/test2.html: very first thing in head section: document.domain = 'mydomain.com';
test2.html has on_dom_ready event that tries to communicate with parent via window.parent
Works in all browser. even in IE6! The only problem is: when I refresh the page in IE, I get the access denied error.
The only way I can get rid of this error is to wait 12 seconds before calling window.parent. Not even 5 seconds help, I literarely have to wait 12 seconds. It makes no sense to me.
Anyone has any experience with this?