Hi, On Mar 15, 4:41 pm, albert kao <[email protected]> wrote: > Is there any "sleep" or "wait" function in Prototype?
There's Function#delay[1] and Function#defer[2]. JavaScript doesn't have any support for yielding in the middle of a function, but you can easily break up a function into different parts and then have the first part call the next part via #defer or #delay, which ends up doing the same thing (and usually in a cleaner way anyhow). [1] http://api.prototypejs.org/language/function.html#delay-instance_method [2] http://api.prototypejs.org/language/function.html#defer-instance_method HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
