On Aug 16, 7:50 am, JoJo <tokyot...@gmail.com> wrote:
> I think I figured it out. The callback must not have parentheses.
>
> FAIL:    onUpdate: someFunction();
> GOOD: onUpdate: someFunction;
>
> I have no idea why.  I am a beginner to JS.
>
Because "onUpdate: someFunction()" means "Call 'someFunction' and make
its return value the value of 'onUpdate'", whereas
"onUpdate:someFunction" means "Make the function 'someFunction' the
value of 'onUpdate'".

--~--~---------~--~----~------------~-------~--~----~
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-scriptaculous@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to