def show_add_user if(request.xhr?) render :update do |rjs| rjs.replace_html :add_user_form, :partial => ''form'' end else redirect_to_index end end How do I add a visual effect to that? Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> render :update do |rjs| > rjs.replace_html :add_user_form, :partial => ''form''rjs.visual_effect(:highlight, "id_of_whatever", :duration => 0.5)> end--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thorsten Mueller wrote:>> � � � render :update do |rjs| >> � � � � � rjs.replace_html :add_user_form, :partial => ''form'' > > rjs.visual_effect(:highlight, "id_of_whatever", :duration > => 0.5)I''m getting this alert... RJS Error: ReferenceError: Effect is not defined Thanks! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 14 Jul 2008, at 17:13, Justin To wrote:> > Thorsten Mueller wrote: >>> � � � render :update do |rjs| >>> � � � � � rjs.replace_html :add_user_form, :partial => >>> ''form'' >> >> rjs.visual_effect(:highlight, "id_of_whatever", :duration >> => 0.5) > > I''m getting this alert... > > RJS Error: > > ReferenceError: Effect is not defined >You''re probably not loading the scriptaculous javascript files (you''ll need at least effects.js) Fred> Thanks! > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---