With Rails 2 on a link_to_remote, I could set :onload, :oncomplete and other options. How do I handle those with Rails 3 since those options are no longer available? (I could go and use the legacy plugin, but I''d like to avoid that if possible.) -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
radhames brito
2010-Oct-03 16:59 UTC
Re: Rails 3, How do I set an :onload for a link_to :remote?
Rails 3 has a more unobtrusive approach and all i s done from external js files. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Can you tell me exactly how I would go about doing this? Code sample perhaps. Or any resources that have that information? I already know about the changes to remove the legacy link_to_remote and other remote helpers, but I haven''t found any resources that tell me more details on how to fully use the replacement. It''s like upgrading getting a new electric car, but not knowing how to use the headlights.. The main features that I''d like to figure out how to do again are :onload and :condition. On Oct 3, 12:59 pm, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Rails 3 has a more unobtrusive approach and all i s done from external js > files.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
radhames brito
2010-Oct-03 17:42 UTC
Re: Re: Rails 3, How do I set an :onload for a link_to :remote?
On Sun, Oct 3, 2010 at 1:37 PM, Jim <huang.jim-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Can you tell me exactly how I would go about doing this? Code sample > perhaps. Or any resources that have that information? > > I already know about the changes to remove the legacy link_to_remote > and other remote helpers, but I haven''t found any resources that tell > me more details on how to fully use the replacement. It''s like > upgrading getting a new electric car, but not knowing how to use the > headlights.. > > The main features that I''d like to figure out how to do again > are :onload and :condition. >The reason you dont find much info is because this now falls in the realm of javascript and has almost nothing to do with rails. Is like looking for info on how to style something or how to build a sql query, is no longer a rails issue. But anyway, i sure can help you but first i need to know what library you are using, go to /public/javascripts folder and tell me if there is a prototype.js or a jquery.js there. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I''m using Prototype. I mainly want to use the equivalent of :onload to show a processing graphic, and :condition to check the value in an input field to see if a request should be sent off to the server. On Oct 3, 1:42 pm, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sun, Oct 3, 2010 at 1:37 PM, Jim <huang....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Can you tell me exactly how I would go about doing this? Code sample > > perhaps. Or any resources that have that information? > > > I already know about the changes to remove the legacy link_to_remote > > and other remote helpers, but I haven''t found any resources that tell > > me more details on how to fully use the replacement. It''s like > > upgrading getting a new electric car, but not knowing how to use the > > headlights.. > > > The main features that I''d like to figure out how to do again > > are :onload and :condition. > > The reason you dont find much info is because this now falls in the realm of > javascript and has almost nothing to do with rails. > Is like looking for info on how to style something or how to build a sql > query, is no longer a rails issue. But anyway, i sure can help you but first > i need to know what library you are using, go to /public/javascripts folder > and tell me if there is a prototype.js or a jquery.js there.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
Can anybody provide code/samples/details on how to do this? On Oct 3, 3:07 pm, Jim <huang....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m using Prototype. I mainly want to use the equivalent of :onload > to show a processing graphic, and :condition to check the value in an > input field to see if a request should be sent off to the server. > > On Oct 3, 1:42 pm, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On Sun, Oct 3, 2010 at 1:37 PM, Jim <huang....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Can you tell me exactly how I would go about doing this? Code sample > > > perhaps. Or any resources that have that information? > > > > I already know about the changes to remove the legacy link_to_remote > > > and other remote helpers, but I haven''t found any resources that tell > > > me more details on how to fully use the replacement. It''s like > > > upgrading getting a new electric car, but not knowing how to use the > > > headlights.. > > > > The main features that I''d like to figure out how to do again > > > are :onload and :condition. > > > The reason you dont find much info is because this now falls in the realm of > > javascript and has almost nothing to do with rails. > > Is like looking for info on how to style something or how to build a sql > > query, is no longer a rails issue. But anyway, i sure can help you but first > > i need to know what library you are using, go to /public/javascripts folder > > and tell me if there is a prototype.js or a jquery.js there.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
radhames brito
2010-Oct-06 20:51 UTC
Re: Re: Rails 3, How do I set an :onload for a link_to :remote?
i have an example app that uses unobstrusive javascript but is running jquery, take a look and ask any questions you want. http://github.com/rbritom/Simple_polymorphic_nested_comments -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Niels G.
2010-Dec-27 08:48 UTC
Re: Rails 3, How do I set an :onload for a link_to :remote?
I had this same question. I found a good answer here: http://www.simonecarletti.com/blog/2010/06/unobtrusive-javascript-in-rails-3/ good luck -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.