Question

i have a webpage which is housing my iFrame which is from a different domain. Now i have a button inside the iFrame which when pressed, needs to refresh or reload the iframe.

I've tried a few methods which are blocked due to cross domain attempts..

Was it helpful?

Solution

In your script within the iframe, try this:

document.location.href = document.location.href;

You can't access elements outside of your document model from within the iframe, including accessing the iframe itself. You can access the properties of the document within it however.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top