Hi David, You could also modify the AJAX Base class to accept a delay parameter, but it's more complex comparing to create an anonymous (or not) function ! I did not see any other choice.
But I think that you should refine your question, because if your using scriptaculous, TJ response is the ONE :)) -- david On 7 déc, 09:38, "T.J. Crowder" <t...@crowdersoftware.com> wrote: > Hi, > > > I'm using animations on my website, and i want to start an Ajax > > request after a animation has finished. So i want to use Function.defer > > (...) on the Ajax.Updater function. > > Your animations don't provide an `afterFinish` callback or similar? > (Script.aculo.us' do, but you didn't say you were using > script.aculo.us, so I'm not assuming.) > > > I don't want to create a new function for using the delay: > > Pretty sure that's your only choice. What's your objection to it? > > HTH, > -- > T.J. Crowder > Independent Software Consultant > tj / crowder software / comwww.crowdersoftware.com > > On Dec 6, 10:51 pm, "David S." <evil.zweitaus...@googlemail.com> > wrote: > > > Hello. > > > I'm using animations on my website, and i want to start an Ajax > > request after a animation has finished. So i want to use Function.defer > > (...) on the Ajax.Updater function. The problem is that the > > Ajax.Updater must be initiated using the "new" keyword, but then > > Ajax.Updater isn't working. > > > I tried it like this: > > new Ajax.Updater.defer(5,'main_body', '?topic='+topic, { evalScripts: > > true }); > > > I don't want to create a new function for using the delay: > > > var submit_ajax = function(topic) { > > new Ajax.Updater('main_body', '?topic='+topic, { evalScripts: > > true });} > > > submit_ajax.delay(0.7,topic); > > > How is it possible to run functions that require "new" after a delay. > > > Thanks. -- 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-scriptacul...@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.