The relevant doc section: http://prototypejs.org/api/function/bind
On May 8, 1:12 am, inigo <[EMAIL PROTECTED]> wrote: > Hello, > In the next code, in the event onSuccess, the value of 'i' is always > 4. > > for (int i=0;i<5;i++){ > url += url +i; > new Ajax.Request( url, { > method: 'get', > onSuccess: function(transport) { > > $('name' + i ).value = > transport.responseText; > > }, > }); > }); > > } > > ¿Are there anyway to send parameters to the function onSuccess? > Notice, I can't modify the response on server. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---