Something like that:
var frameRefreshInterval = setInterval(2000, function() { document.getElementById("myframe").src = document.getElementById("myframe").src });
The interval resets the iframe src attribute every 2 seconds (2000 milliseconds)
Edit to respond to your comments: This, like any other code that manipulates the DOM, must be in the window.onload event listener or the like:
<script type=text/javascript> window.onload = function() { var frameRefreshInterval = setInterval(2000, function() { document.getElementById("myframe").src = document.getElementById("myframe").src }); </script>
Griffin
source share