I have several calls to PeriodicalUpdater on my page. These refresh the content within a <div> tag every minute. The problem is that there are times where I want the updates to stop. The weak documentation on prototype.js makes mention of it but I have no idea how to implement it. Has anyone been able to do this?
My code is simple really. I have about 4 calls to the following function for different <div>s. All four update at different times.
<script type=”text/javascript” language=”JavaScript”>
function fetchupdate(url,pars,tag,methtype,interval,decaymultiplier)
{ var myAjax = new Ajax.PeriodicalUpdater(tag,url,{method: methtype,parameters: pars,asynchronous: true,frequency: interval, decay: decaymultiplier});}
</script>
and I make the calls to the function on load like this:
fetchupdate(‘/ping/panel_l_whosout.php’,”,’whosout’,’post’,120.0,1);
How can I write a javascript function to selectively choose the particular fetchupdate tand stop it’s PeriodicalExecuter from runng?