Dnia 6-04-2006 o godz. 14:01 Nicolas Terray napisał(a): > On 4/6/06, Grzesiek Slusarek <[EMAIL PROTECTED]> wrote: > > Hi all. I my apps I need to use Ajax.Request Object. One of the object > options is onComplete fuction which looks like this: > > funcion onComplete (originalResponse) > > { > > ..some operations > > } > > I need pass to function one more parameter, how to do it? is is > possible? I can't use AJAX Updater because result of Ajax Call is > uploaded to the div that I defined earlier, and in my situations I don't > know id of my html element. I need to do something like this: > > funcion onComplete(originalResponse,param1) > > { > > if (param1 != something) > > $('result').value = originalRequest.responseText; > > else > > $('resultSecond').value = originalRequest.responseText; > > } > > How to achieve this? > > > > What is the need ? Where does param1 come from ?
Well that was only definition of the funcion, where it come from? I want to put param1 in the Ajax.Request object: var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars, onComplete: showResponse;param1 }); Something like code above? But is it possible, is there a nice way to do This? I think that there is great need to do something with Ajax response depend on some variable.. But we have only Ajax Reqeust that response must be prepare by user or AJAX Updater that is allways putted in the html, and e.g. if I get Ajax result from serwer I want to decide should I put result in to html or brake it off. Any help will be appraciated, sorry for my bad english ---------------------------------------------------- Uroda, horoskopy, zdrowie, moda - sprawdź sama http://klik.wp.pl/?adr=www.kobieta.wp.pl&sid=715 _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs