Alex has given you the solution, but I thought I'd explain it. var options = { onEnd: cool()}
means "Run cool(), and whatever the result is, assign that to the property onEnd" var options = { onEnd: cool} means "Assign the object cool (which happens to be a function) to the property onEnd" If you want to pass arguments to that future-invocation-of-cool you need to wrap it up, most easily in a closure: var myarg; var options = { onEnd: function() {cool(myarg);}} which means "Assign an anonymous function which will run cool(myarg) to the property onEnd. Colin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---