That looks like it will work.. 

or I could just pass the prams on to my complete function.. NO?

onComplete: function(response) {
    yourOnComplete(response,prams);
}

______________________________________________________________________

Alex Duffield . Principal . InControl Solutions . http://www.incontrolsolutions.com 




On 5-Aug-06, at 9:29 AM, Michael Peters wrote:



Alex Duffield wrote:
Eric, thanks for the answer. I was hoping to be able to get the options
(parameters in particular)  that where used in the origian request. Oh
well. Ill find another solution. 

You could just use a closure:

new Ajax.Request(
  url,
  {
    parameters: params,
    ...
    onComplete: function(response) {
      // you can access the 'params'
      // in here
    },
  }
);

Now, if you pass a function by name instead for your onComplete value, you can
just wrap it in an anonymous function like so

  onComplete: function(response) {
    // use 'params'
    yourOnComplete(response, ...);
  }

-- 
Michael Peters
Developer
Plus Three, LP

_______________________________________________
Rails-spinoffs mailing list

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to