systm.spanish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Dec-15 01:36 UTC
How can i adapt Ajax.PeriodicalUpdater onto my old code ?
Hi everyone.! well i want to change Ajax.Updater From prototype and make use of Ajax.PeriodicalUpdater but i dont get the idea this is my Actual code. function getMessages() { var chat_div = document.getElementById(''chat''); chat_div.scrollTop = chat_div.scrollHeight; new Ajax.Updater( ''chat'', ''messages.php'', { onSuccess: function() { window.setTimeout( getMessages, 1500 ); } } ); } getMessages(); i would like to use PeriodicalUpdater on this script from now on but it does not work any ideas ? thanks in advance.!! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
here the doc page, http://www.prototypejs.org/api/ajax/periodicalUpdater if you got more questions this is the place ;) On Dec 14, 2007 7:36 PM, systm.spanish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <systm.spanish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi everyone.! well i want to change Ajax.Updater From prototype and > make use of Ajax.PeriodicalUpdater but i dont get the idea this is my > Actual code. > > function getMessages() > { > var chat_div = document.getElementById(''chat''); > chat_div.scrollTop = chat_div.scrollHeight; > new Ajax.Updater( ''chat'', ''messages.php'', { > onSuccess: function() { window.setTimeout( getMessages, 1500 ); } > > > } ); > } > > getMessages(); > > i would like to use PeriodicalUpdater on this script from now on but > it does not work any ideas ? thanks in advance.!! > > >-- {a human being that was given to fly} --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---