Diodeus wrote:
> In another situation, I need to pass parameters to the callback. So
> would I do it this way?
> var temp = handleCompletion(5)
> wrapAjaxUpdater('showsomething.php?id=5', 'somediv', temp);

That still is not correct. This would assign the *result* of the 
handleCompletion function to the temp variable.

What you need here is to curry[1] the function with parameters.

var temp = handleCompletion.curry(5);
wrapAjaxUpdater('showsomething.php?id=5', 'somediv', temp)
//or in one (almost) line:
wrapAjaxUpdater('showsomething.php?id=5', 'somediv',

Please read the docs of curry[1]. It is worth to at least skim through 
the whole api docs of prototype.js.

[1] http://prototypejs.org/api/function/curry

Best Regards

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 
For more options, visit this group at 

Reply via email to