I have a page with multiple iframes and need to have the user (ie6) be able to click a button to refresh any one of the iframes - but also to click another button at the top of the page to refresh all of them - from the server (this could be on page refresh also) as the purpose is to reset the iframe to the original content in case the user clicked on a link in that iframe and changed it, but also in case there were updates to the original page since the last load. The page hosting the iframes is in a frameset.
I used the following code from an older thread but (as I don't know javascript) when I modified it to include two iframes for a test it didn't work. It refloads only the first iframe when clicking either button. Reloading the whole page doesn't reload the iframes if they have been changed, and I need that (again, from the server), too.
This needs to be manual reloading as the info in the iframe may be in use at any moment and I can't have it vanish unexpectedly even for a few seconds.
Also, is there any way to block break out of frames code for an iframe?
Your help is much appreciated!
[HTML]<html>
<head>
<script type="text/javascript">
function Reload () {
var f = document.getElementById('iframe1','iframe2');
f.src = f.src;
}
</script>
</head>
<body>
<iframe id="iframe1" height="200" width="900"
src="http://google.com"></iframe>
<br>
<input type="button" value="Reload Original CSI Content" onclick="Reload();">
<iframe id="iframe2" height="200" width="900"
src="http://google.com"></iframe>
<br>
<input type="button" value="Reload Original CSI Content" onclick="Reload();">
</body>
</html>[/HTML]