Code:
<html>
<head>
<script type="text/javascript">
function updateFrame() {
document.getElementById("loopingFrame").src = "notes" + (updateFrame.count++) + "as.txt";
};
updateFrame.count = 1;
</script>
</head>
<body>
<iframe id="loopingFrame" src="notes.txt" onload="if(updateFrame.count < 4) setTimeout(updateFrame, 5000);">
</iframe>
</body>
</html>
Notes: When hard coded like we have it, the onload event of an iframe may not fire in some browsers, so it is better to add it to the iframe using addEventListener/attachEvent, but the above does illustrate one solution to your question about the timeout.
Bookmarks