gzerphey-z8e8b8ssw6vk1uMJSBkQmQ@public.gmane.org
2006-Nov-03 20:59 UTC
periodical updater problems
I hope you guys can help me on this. I have two functions. The first calls a periodical updater and does it quite successfully. The second is meant to stop said updater. It however fails when I call it. It just wont stop the updater. I''m sorry if I am missing something stupid. Thank you in advance, function foobar(){ var searchvar = "ipadd=" + $F(ip) + "&commstring=" + $F(snmpstr) + "&snmpelem=" + $F(RSL); var opt = { method: ''post'', parameters: searchvar, frequency: 1 } new Ajax.PeriodicalUpdater(''snmpResult'',''snmpsearch.php'',opt); } function barbar(){ opt.updater.options.onComplete = undefined; opt.stop(); --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
You''ve declared what opt is--and it is not the updater, but the options for the updater. You have not assigned the updater to a variable. Try something similar to: var upd = new Ajax.PeriodicalUpdater(''snmpResult'',''snmpsearch.php'',{ method: ''post'', parameters: searchvar, frequency: 1 }); TAG On Nov 3, 2006, at 1:59 PM, gzerphey-z8e8b8ssw6vk1uMJSBkQmQ@public.gmane.org wrote:> > I hope you guys can help me on this. I have two functions. The first > calls a periodical updater and does it quite successfully. The second > is meant to stop said updater. It however fails when I call it. It > just wont stop the updater. I''m sorry if I am missing something > stupid. > > Thank you in advance, > > function foobar(){ > var searchvar = "ipadd=" + $F(ip) + "&commstring=" + $F(snmpstr) + > "&snmpelem=" + $F(RSL); > var opt = { > method: ''post'', > parameters: searchvar, > frequency: 1 > } > > new Ajax.PeriodicalUpdater(''snmpResult'',''snmpsearch.php'',opt); > > } > > function barbar(){ > opt.updater.options.onComplete = undefined; > opt.stop(); > > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
gzerphey-z8e8b8ssw6vk1uMJSBkQmQ@public.gmane.org
2006-Nov-03 22:06 UTC
Re: periodical updater problems
Thank you so very much for making my world sane again. I defined a global variable and assigned that process to it and it working great now. Thank you again, --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---