Refreshing an iframe with the same page programatically
On my web page, there is a iframe with a page loaded (from the same domain). There is another button on the web page. When this button is clicked, i want the iframe refreshed with the same page. How can i achieve this?
Another thing to note is that, I do not know the url of the web page displayed in the iframe at any given time.
Re: Refreshing an iframe with the same page programatically
This is confusing, can you give us an example?
Re: Refreshing an iframe with the same page programatically
If the web page in the iframe is not in your domain, you will not have access writes to use JavaScript on it. For example if the iframe url is http://www.google.com, you cannot refresh it using JavaScript. If it is in the same domain as your page not in the iframe, use...
Code:
IFRAMENAME.location.reload()