search for: theelement

Displaying 4 results from an estimated 4 matches for "theelement".

2006 Apr 10
10
Prototype Ajax - How to pass my own params to onComplete ?
...nda weak as well. Is there no way to keep my current context when the ajax onComplete function is triggered? Here''s my trimmed down code sample: ----------------------------------- //global reference to the element invoking the action var NamedActionElement; function NamedActionHandler(theElement) { //set our global reference to the element so we can access it in later functions //since ajax calls take us to other functions and we can''t seem to pass it along NamedActionElement = theElement; //skip setting up my vars for the ajax call //make the ajax call var ajaxCall = new...
2006 Apr 10
1
RE: Re: Prototype Ajax - How to pass my own params toonComplete
...make sure the event object is passed along, in the case of real event handlers, but that doesn''t apply here. I''m not sure why my suggestion earlier didn''t work. You should be able to do this: onComplete: function (theResponse) { NamedActionResponseHandler(theResponse, theElement); } function NamedActionResponseHandler (theResponse, theElement) { // work your magic } If you are sending your ajax call inside another object and need to make sure the response function is called on the same object, that is where the .bind() would be useful. Greg > -----Original Message-...
2006 Apr 10
1
RE: Prototype Ajax - How to pass my own params toonComplete ?
You need a closure. onComplete: function (response) { NamedActionResponseHandler(theElement, response); } Is that what you mean? Greg > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Erin Brewer > Sent: Monday, April...
2006 Aug 07
5
RJS Change Background Color
What''s the page.method to change the background color of a DOM element? I''m trying to change the background color of a couple of styled <li>''s when an Ajax link is clicked. Thanks, David -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060807/63de04bf/attachment.html