ok, I have looked for the past two days for an example of how to get the stop method to work. I have yet to find a coheasive example my code is strate formard. I have three sections to my site. The first is the about section, second is a ticker section and third is historical section. So when the user clicks on the ticker section this needs to update every 15 seconds. The other two pages don't need to update. The problem is when the user clicks on the about or historical page I see the PeriodicalUpdater still runnning in the background on firebug. My code
/** * makePeriodicalUpdater function is a shortcut to the prototype Ajax.Updater object. * @param div the div that you want the response to be written into. * @param url the location to send the request to. * @param method post or get. * @param method pars any parameters that need to be passed. These should be in QueryString format. * @param eval boolean that decides whether or not scripts should be evaluated. **/ PeriodicalUpdater: function(localDiv, localUrl, localMethod, localPars, localEval) { objTick = new Ajax.PeriodicalUpdater( localDiv, localUrl, { frequency : 15, decay: 1.1, method: localMethod, parameters: localPars, evalScripts:localEval }); //turns the local div on $(localDiv).style.display='block'; return true; }, Then later in the code if the use clicks on the about link I have if(request=='about') { ... code that hides the divs that are currently displayed ...... this.objTick.stop(); .... Then more code to display the about page which goes to a just Ajax.Updater class. ..... } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---