hi! both options work fine, many thanks for your help :)
On 26 jun, 21:20, "Frederick Polgardy" <[EMAIL PROTECTED]> wrote: > function getRSS(*memo*) { > var url = "feed.xhtml"; > var myAjax = new Ajax.Request(url, { > method: 'get', > parameters: parms, > onComplete: function(res, headers) { > processRSS(res, headers, *memo*); > }); > > } > > function processRSS(res, header, *memo*) { > ... > > } > > getRSS(*myMemo*); > > -Fred > > > > > > On Thu, Jun 26, 2008 at 1:02 PM, ljundie <[EMAIL PROTECTED]> wrote: > > > hi all, > > > i'd like to know if there's a way to send parameters to a callback in > > Prototype. For example, i have a code like: > > > function getRSS() { > > var url = "feed.xhtml"; > > var myAjax = new Ajax.Request( url, {method: 'get', parameters: > > parms, onComplete: processRSS} ); > > } > > > function processRSS(xmlHttpRequest, responseHeader) { > > > var xmlString = xmlHttpRequest.responseText; > > > alert (xmlString); > > > } > > > would be possible to give more parameters to processRSS() and do > > something like... > > > function processRSS(xmlHttpRequest, responseHeader, foo) { > > > var xmlString = xmlHttpRequest.responseText; > > > if (foo){ > > alert (xmlString); > > } > > } > > > thanks in advance for your help, > > Luis > > -- > Science answers questions; philosophy questions answers.- Ocultar texto de la > cita - > > - Mostrar texto de la cita - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---