Hello, I am having difficulty implementing the yellow fade technique after a redirection. All the examples I have seen use it immediately after editing an in-place form via Ajax. I would like to use it after editing a form on a different page. Is it possible to do this in a reliably cross-browser way? To be specific, my index action shows a list of people. When you click on a person you are taken to a new page to edit the person''s details. When you have made your changes and submitted that form, you are redirected back to the index action. I would like, at this point, to highlight briefly the person who was just edited. I can''t do an in-place form for editing the person right there on the index page because the person model has many attributes and the fields need an entire page to themselves to be legible. Any help would be much appreciated. Thanks and regards, Andy Stewart --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Put the person''s ID in the flash, and do thustly: window.onload = function() { new Effect.Highlight(''domId_<%= flash[:person_id] %>'', {duration: 1, startcolor: #cccccc, endcolor: #dddddd}); } Should do the trick. This is all from my head and with the documentation below. Of course, make changes as you need and see fit. http://wiki.script.aculo.us/scriptaculous/show/Effect.Highlight Jason On 1/2/07, Andrew Stewart <boss-rAnrN1QAkGGttCpgsWEBFlaTQe2KTcn/@public.gmane.org> wrote:> > > Hello, > > I am having difficulty implementing the yellow fade technique after a > redirection. All the examples I have seen use it immediately after > editing an in-place form via Ajax. I would like to use it after > editing a form on a different page. Is it possible to do this in a > reliably cross-browser way? > > To be specific, my index action shows a list of people. When you > click on a person you are taken to a new page to edit the person''s > details. When you have made your changes and submitted that form, > you are redirected back to the index action. I would like, at this > point, to highlight briefly the person who was just edited. > > I can''t do an in-place form for editing the person right there on the > index page because the person model has many attributes and the > fields need an entire page to themselves to be legible. > > Any help would be much appreciated. > > Thanks and regards, > Andy Stewart > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You could simply include the id of the record just edited in the redirect back to the list. Then in the list view check for the presence of that parameter and highlight the element with a matching id. -- Building an e-commerce site with Rails? http://www.agilewebdevelopment.com/rails-ecommerce On Jan 2, 2007, at 9:41 AM, Andrew Stewart wrote:> > Hello, > > I am having difficulty implementing the yellow fade technique after > a redirection. All the examples I have seen use it immediately > after editing an in-place form via Ajax. I would like to use it > after editing a form on a different page. Is it possible to do > this in a reliably cross-browser way? > > To be specific, my index action shows a list of people. When you > click on a person you are taken to a new page to edit the person''s > details. When you have made your changes and submitted that form, > you are redirected back to the index action. I would like, at > this point, to highlight briefly the person who was just edited. > > I can''t do an in-place form for editing the person right there on > the index page because the person model has many attributes and > the fields need an entire page to themselves to be legible. > > Any help would be much appreciated. > > Thanks and regards, > Andy Stewart--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---