<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
As I wrote (and as is explained in the link), the setInterval()
function returns<br>
a timerId. You can then pass this to the clearInterval() function to
stop it:<br>
<br>
<tt>window.refreshTimerId = null;<br>
<br>
function StartRefreshTimer()<br>
{<br>
&nbsp;&nbsp;&nbsp; if (window.refreshTimerId == null)<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; window.refreshTimerId =
window.setInterval('GetMapFrame().Refresh()', 10000);<br>
&nbsp;&nbsp;&nbsp; else<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; alert('Already refreshing!');<br>
}<br>
<br>
function StopRefreshTimer()<br>
{<br>
&nbsp;&nbsp;&nbsp; if (window.refreshTimerId != null)<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; window.clearInterval(window.refreshTimerId);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; window.refreshTimerId = null;<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; else<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; alert('Was not refreshing!');<br>
}</tt><br>
<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
ajid1980 skrev:
<blockquote cite="mid:20835634.post@talk.nabble.com" type="cite">
  <pre wrap="">What is the criteria for stopping it? 
My Criteria it depends on my script like this (called=START) &lt;
window.setInterval('GetMapFrame().Refresh()', 10000); &gt; So i want to make
other Invoke Script (called=STOP) to Stop it.. I tried many many java
scripts to stop the refresh function.. so anyone help how??or other method
?? 





Kenneth Skovhede, GEOGRAF A/S wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">What is the criteria for stopping it?

See the "clearInterval" method:
<a class="moz-txt-link-freetext" href="http://www.elated.com/articles/javascript-timers-with-settimeout-and-setinterval/">http://www.elated.com/articles/javascript-timers-with-settimeout-and-setinterval/</a>

Regards, Kenneth Skovhede, GEOGRAF A/S



ajid1980 skrev:
    </pre>
    <blockquote type="cite">
      <pre wrap="">hai all 
i found the refresh script and put it on Invoke Script &lt;
window.setInterval('GetMapFrame().Refresh()', 10000); &gt;
So how i wanna to stop it??
Thanx
  
      </pre>
    </blockquote>
    <pre wrap="">_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>


    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
</body>
</html>