Hello, I''ve created a nice function using prototype and scriptaculous. Very limited but with a very nice effect. Essentially, when ever i call ajax i show a loading indicator and then hide the indicator and use the effect.Appear effect to show the content returned. Here''s my sample: http://www.servandomontero.com/test/test_ajax/index.html My question is how i can i pass the div to the Ajax.Responders.register ''listener'' as a parameter to this line of code in the Ajax.Responders.register: In the code below, in the function ''update_div'' i use a ''div'' (el_div). That div (el_div) should be use in the Ajax.Responders.register but i don''t know how to pass that parameter So instead of $(''products'').hide(); it should be something like : $ (el_div).hide(); Can i pass parameters to the Ajax.Responders.register from the function update_div? CODE: ------------ Ajax.Responders.register({ onCreate: function() { if($(''loading_box'') && Ajax.activeRequestCount>0) $(''products'').hide(); // *** SHOULD BE $(el_div).hide(); $(''loading_box'').show(); //Effect.Appear(''loading_box'', {duration:1.0, queue:''end''}); }, onComplete: function() { if($(''loading_box'') && Ajax.activeRequestCount==0) $(''loading_box'').hide(); // *** SHOULD BE $(el_div).show(); Effect.Appear(''products'', {duration:1.0, queue:''end''}); } }); ---------- function update_div(el_div, url) { new Ajax.Updater({success:el_div}, url, {method:''get''}); } ------------ Can i pass parameter to the Ajax.Responders.register ? Thanks marco --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---