I'm new to javascript but have managed to create the following with tidbits from the web....What I can't get done is how to get the function refresh to stop after X amount of times or X amount of time. Any help would be greatly appreciated.


<style type="text/css">

<!--resize and position window-->
<script type=text/javascript>
function expand() {
	for(x = 0; x < 50; x++) {window.resizeTo(995,810);window.moveTo(0,0)}}

<body onload="expand()" style="overflow-y:hidden">

<!--refresh ackpage1 iframe-->
<script type=text/javascript>
	function refresh()
		{document.all.magic1.src = document.all.magic1.src}

<div class='root'>
<tr><td><iframe src="http://blahblahblah.html" id="magic1" name="magic1" width="990" height="800" scrolling="yes" align="right" frameborder="no" marginheight="0" marginwidth="0"></iframe></td></tr>

Instead of: window.setInterval("refresh()",600000); you need to save a reference to that call: timerID = window.setInterval("refresh()",600000); THEN (whenever you are ready), you use timerID to stop subsequent calls by passing that id to clearInterval. clearInterval(timerID)