I have a webpage with an IFrame and a Button, once the button is pressed I need the IFrame to be refreshed. Is this possible, if so how? I searched and could not find any answers.
+2
A:
var iframe = document.getElementById('youriframe');
iframe.src = iframe.src;
Balon
2010-01-14 14:45:13
+1
A:
This should help:
document.getElementById('FrameID').contentDocument.location.reload(true);
nfechner
2010-01-14 14:47:09
+1
A:
provided the iframe is loaded from the same domain, you can do this, which makes a little more sense:
iframe.contentWindow.location.reload();
Horia Dragomir
2010-01-14 14:50:19