Rain Lover Posted January 1, 2014 Share Posted January 1, 2014 Sample parent code: <!DOCTYPE html><html><head><meta charset="UTF-8"><title>Parent</title></head><body><iframe src="https://dl.dropboxusercontent.com/u/4017788/Labs/child.html" width="200" height="100"></iframe></body></html> See it in action: https://googledrive.com/host/0B5jOXzxlxbMhYVF3b0lubjlDWm8/parent.html Sample child code: <!DOCTYPE html><html><head><meta charset="UTF-8"><title>Child</title></head><body><button onclick="myFunction();">Try it!</button><script>function myFunction() {parent.location.reload();}</script></body></html> I have tried many methods offered in similar questions to no avail, such as: window.parent.location.reload(); top.location.reload(); etc. What am I missing and what's the right approach? Link to comment Share on other sites More sharing options...
Ingolme Posted January 1, 2014 Share Posted January 1, 2014 The two pages are on different domains. They are not allowed to interact with eachother. Here's the message from the error console: Error: Permission denied to access property 'reload'parent.location.reload(); Link to comment Share on other sites More sharing options...
Rain Lover Posted January 2, 2014 Author Share Posted January 2, 2014 The two pages are on different domains. They are not allowed to interact with eachother. Here's the message from the error console: Yes, that seems to be the problem. Then I need to put my question this way: How to reload the parent frame that's located on a different frame? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now