Click to See Complete Forum and Search --> : Refreshing an iframe with the same page programatically


hitai
October 16th, 2006, 03:38 AM
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.

danbopes
October 16th, 2006, 04:34 AM
This is confusing, can you give us an example?

PeejAvery
October 16th, 2006, 11:36 AM
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...

IFRAMENAME.location.reload()