I have a link_to_remote that I am hoping will be able to slide up and
down a particaular div, my issue is that I cannot get all the callbacks
to work together. Here is what I have:
<%= link_to_remote( ''S'', :url => { :action =>
''show_users'',
   :letter => ''S'', :company_id => x.primary_account_id},
   :update => @company_title.name,
   :before => ''new Effect.toggle(\'''' +
@company_title.name + ''\'',
\''slide\'');'',
   :complete => ''new Effect.toggle(\'''' +
@company_title.name + ''\'',
     \''slide\'');'') -%>
Which doesnt work at all. If I take out the :before it works. .
.somewhat, not the way that I want but works, none the less. How do you
combine all the callbacks into a single link_to_remote? I realize that I
am propbably missing {} somewhere, but I cannot find any good
documention on this anywhere. Thanks,
-S
-- 
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
-~----------~----~----~----~------~----~------~--~---
On 14 Oct 2008, at 18:25, Shandy Nantz wrote:> > I have a link_to_remote that I am hoping will be able to slide up and > down a particaular div, my issue is that I cannot get all the > callbacks > to work together. Here is what I have: > > <%= link_to_remote( ''S'', :url => { :action => ''show_users'', > :letter => ''S'', :company_id => x.primary_account_id}, > :update => @company_title.name, > :before => ''new Effect.toggle(\'''' + @company_title.name + ''\'', > \''slide\'');'',I think there''s an extra '' in there. :before => "new Effect.toggle(''#{@company_title.name}'',''slide'');", is considerably easier to read. you should also be careful that the comany name does have a '' in it (and be aware that not all characters are legal in dom ids, so you could make the browser freak out. Fred> > :complete => ''new Effect.toggle(\'''' + @company_title.name + ''\'', > \''slide\'');'') -%> > > Which doesnt work at all. If I take out the :before it works. . > .somewhat, not the way that I want but works, none the less. How do > you > combine all the callbacks into a single link_to_remote? I realize > that I > am propbably missing {} somewhere, but I cannot find any good > documention on this anywhere. Thanks, > > -S > -- > 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 14 Oct 2008, at 18:25, Shandy Nantz wrote: > :before => "new Effect.toggle(''#{@company_title.name}'',''slide'');", > FredI changed it but it is still not working. When I look at the source I see the Ajax for the OnComplete but not anything for the :before callback. -- 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 -~----------~----~----~----~------~----~------~--~---