Thanks Fred. I've followed the second option and it worked. Below is my code, in case someone will find it helpful:
var updateCounter = 0; function createUpdater(freq) { updater = new Ajax.PeriodicalUpdater("ajaxDIV", "Tickets.jsp", { frequency: freq, evalScripts: true, onCreate: function() { // change update frequency when data size changes, and after the initial load if (updateCounter != 0 && dataSize != this.frequency / 5) { alert("data size changed. frequency new: " + dataSize * 5 + " old: " + this.frequency) updateCounter = 0; updater = createUpdater(dataSize * 5); this.updater.stop(); } }, onSuccess: function() { updateCounter ++; }, parameters: Form.serialize($("form")) } ) ; return updater; } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---