<div dir="ltr"><div><span class="gmail-Apple-tab-span" style="white-space:pre">Hi,</span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"><br></span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">I use JSObject>>interval: (thanks Johan) for my report generation: </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">first I show a spinner. Every 2 seconds, I try to reload the reports png file (it takes a little time to generate it).</span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">This works but </span><span style="white-space:pre"> I have one final problem:</span><span style="white-space:pre"> how can I stop the interval?</span></div><div><span style="white-space:pre">Four intervals are started each time the user selects a trip and wants the reports to be shown (there are 4 report types currently). I have to stop them, if not, they overlap with the old reports. </span></div><div><br></div><div>Below is a part of the code I use. As far as I understand, I need an ID of the interval to call clearInterval(timerId); In the onComplete: of the load I want to call clearInterval() with this timerId.<br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>html div<br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>...</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">            </span>script:</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>((html jQuery id: anId) load</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                           </span>html: [ :r | </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                                 ...show the report file...</span> ];</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                         </span>interval: 2 seconds);</div><div><br></div><div>It creates this JS</div><div><br></div><div><div>setInterval(function(){$("#imageVehicleReport").load("/RKA",["_s=sW0fUJ73IwxSs_bo","_k=b14htm7FJ6AWvWeW","4152"].join("&"))},2000)</div><div><br></div></div><div>How can I stop it?</div><div><br></div><div>Regards</div><div>Sabine </div></div>