ANSWER: I discovered that you can set the document domain in both pages to avoid the security error:
document.domain = "mydomain.com"
in the iframe src page as well as the parent page.
Main Topics
Browse All TopicsI have a page with an iframe. The src of the iframe has code that calls a javascript function on the parent (parent.myfunction();). It does that onClick.
When clicking, I get a Permission Denied error.
After some experimenting, I noticed that my iframe src begins with http://www.
I get the error if I omitted the "www" in the address bar. i.e. http://mydomain.com (that happens when you just type mydomain.com in the address bar).
If I type www.mydomain.com, I don't get the error.
My research uncovered that the permission error is when the iframe holds a page from a different domain -- for security reasons.
But, in my case, it is the SAME domain. But, one visitor might use the www and another might not. How do I make both instances work?
BTW, the message from Chrome's Inspect Object is: "Unsafe JavaScript attempt to access frame with URL"
Again problem goes away when the parent was loaded with www.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
or with a hack, you can access to different domain...
http://pipwerks.com/journa
Business Accounts
Answer for Membership
by: HainKurtPosted on 2009-08-13 at 18:08:24ID: 25094570
read this... looks like it is possible by playing with settings on dns server
2007/08/07 /how-to-cr oss-domain - javascrip t/
http://www.alexpooley.com/