info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org
2005-Dec-05 17:44 UTC
Effect.Highlight on Ajax.Updater
Hello to all list members... Exchuse for my bad english, I don''t write english very well. I''m searching for a solution to hilight a div when his value change. The value in these div is take from Ajax.Updater . the code is: new Ajax.Updater(''acc'',''tools/head_info.php'',{asynchronous:true}); and have a settimeout to recall it every 5 seconds. Can you suggest how highlight the acc div when is value change? Thank you, Antonello PS: why not open a script.aculo.us forum''s?
new Ajax.Updater(''acc'',''tools/head_info.php'',{asynchronous:true, * onSuccess=highlightacc*}); *var highlightacc = function(originalRequest) { new Effect.Highlight(''acc''); } *And if you want to periodically update this div, why not use PeriodicalUpdater instead of Updater? (http://www.sergiopereira.com/articles/prototype.js.html#Ajax.PeriodicalUpdater) On 12/5/05, info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org <info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org> wrote:> Hello to all list members... > > Exchuse for my bad english, I don''t write english very well. > > I''m searching for a solution to hilight a div when his value change. > The value in these div is take from Ajax.Updater . > > the code is: > new Ajax.Updater(''acc'',''tools/head_info.php'',{asynchronous:true}); > > and have a settimeout to recall it every 5 seconds. > > Can you suggest how highlight the acc div when is value change? > > Thank you, > Antonello > > PS: why not open a script.aculo.us forum''s? > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org
2005-Dec-06 17:55 UTC
Re: Effect.Highlight on Ajax.Updater
Hi Amol, thank you for the reply.> new Ajax.Updater(''acc'',''tools/head_info.php'',{asynchronous:true, * > onSuccess=highlightacc*}); > > *var highlightacc = function(originalRequest) { > new Effect.Highlight(''acc''); > }good... but you think it''s possible to recall highlightacc only when the output of tools/head_info.php is changed? I would want that the div not every time was highlighted(onSuccess), but only when its value changes.> > *And if you want to periodically update this div, why not use > PeriodicalUpdater instead of Updater? > (http://www.sergiopereira.com/articles/prototype.js.html#Ajax.PeriodicalUpdater)I think that I must study the document that you have suggested to me> > > > > On 12/5/05, info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org <info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org> wrote: >> Hello to all list members... >> >> Exchuse for my bad english, I don''t write english very well. >> >> I''m searching for a solution to hilight a div when his value change. >> The value in these div is take from Ajax.Updater . >> >> the code is: >> new Ajax.Updater(''acc'',''tools/head_info.php'',{asynchronous:true}); >> >> and have a settimeout to recall it every 5 seconds. >> >> Can you suggest how highlight the acc div when is value change? >> >> Thank you, >> Antonello >> >> PS: why not open a script.aculo.us forum''s? >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org
2005-Dec-09 11:35 UTC
Re: Effect.Highlight on Ajax.Updater
Hi to all,> Hi Amol, > thank you for the reply. > >> new Ajax.Updater(''acc'',''tools/head_info.php'',{asynchronous:true, * >> onSuccess=highlightacc*}); >> >> *var highlightacc = function(originalRequest) { >> new Effect.Highlight(''acc''); >> } > good... but you think it''s possible to recall highlightacc only when the > output of tools/head_info.php is changed? > I would want that the div not every time was highlighted(onSuccess), but > only when its value changes.for the moment I have make a no-visible div "acc_o" with the old "acc" div value. After the onComplete, I check if the new "acc" value is different from "acc_o" value and then recall highlightacc I think there isn''t a more simple way to do these. Antonello> >> >> *And if you want to periodically update this div, why not use >> PeriodicalUpdater instead of Updater? >> (http://www.sergiopereira.com/articles/prototype.js.html#Ajax.PeriodicalUpdater) > I think that I must study the document that you have suggested to me > > >> >> >> >> >> On 12/5/05, info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org <info-F3mW5S/pqWZeoWH0uzbU5w@public.gmane.org> wrote: >>> Hello to all list members... >>> >>> Exchuse for my bad english, I don''t write english very well. >>> >>> I''m searching for a solution to hilight a div when his value change. >>> The value in these div is take from Ajax.Updater . >>> >>> the code is: >>> new Ajax.Updater(''acc'',''tools/head_info.php'',{asynchronous:true}); >>> >>> and have a settimeout to recall it every 5 seconds. >>> >>> Can you suggest how highlight the acc div when is value change? >>> >>> Thank you, >>> Antonello >>> >>> PS: why not open a script.aculo.us forum''s? >>> _______________________________________________ >>> Rails-spinoffs mailing list >>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> > >