2009/6/27 T.J. Crowder <[email protected]>
>
> I've written up a couple of things about closures that may be helpful,
> and specifically that walk you through this business of references vs.
> values:
>
> http://blog.niftysnippets.org/2008/02/closures-are-not-complicated.html
> http://blog.niftysnippets.org/2008/03/closures-by-example.html
>
>
Hi T.J.
Today at last I readed your blog.
Based on your explanation I changed my function to this and work perfectly,
many thanks.
document.observe('dom:loaded', function(){
function observaEvento(evento){
elm = $(evento);
if (elm) {
elm.observe('change', function(evt) {
console.log("call to: %s", 'sic:'+evento);
document.fire('sic:'+evento);
});
}
}
observaEvento('proyecto');
observaEvento('material');
});
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---