Can't you just put the periodical updater script into the onCreate callback of the Updater function, and end it onComplete?
-- Calvin Lai Business Development http://dealspl.us On Fri, Dec 19, 2008 at 7:12 AM, Topper <vaccarez...@gmail.com> wrote: > > Hello. I have a page where co-exists an Updater and a > PeriodicalUpdater. The problem is that once I execute the updater > (with a form submit) the periodical updater stops working until the > form finishes processing. And this is bad because my periodical > updater was created just for showing the form progress (because the > form sends emails and may take a while to finish). Is there any way to > force the periodical to work while the form is still processing? > Here's a bit of the js code: > > EmailsSpy = function(){ > new Ajax.PeriodicalUpdater('emails_being_sent','<?php echo > WEB_PATH; ?>/newsletters/get_emails_sent/', > { > method: 'get', > frequency: 2, > decay: 1 > }); > } > > Event.observe(window, 'load', EmailsSpy, false); > > Start = function(){ //called by the form > > var mySubmit = document.getElementById('submit_button'); > var myTargetDiv = document.getElementById('emails_sent'); > new Ajax.Updater('emails_sent','<?php echo WEB_PATH; > ?>/newsletters/ > sendit/', > { > asynchronous: true, > parameters: Form.serialize('sendForm'), > evalScripts: true, > onCreate: function() > { > mySubmit.disabled = true; > myTargetDiv.innerHTML = "Procesando... por > favor aguarde ...."; > }, > onComplete: function(r) > { > //alert(r.responseText); > mySubmit.disabled = false; > } > }); > > > Regards > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---