In my controller I have a simple "create" method and in the output section, I have: format.js do @traces = Trace.getLatest render :update do |page| page.visual_effect :highlight, :homeContentPanel page.replace_html :homeContentPanel, :partial => "home/ traceList", :locals => { :traces => @traces}, :layout => false end end The intent is to, of course, simply updated a div "homeContentPanel" with the results of a partial. The partial that is _normally_ a part of the div anyway. What I get is a completely odd formatted output. A sample is below. Try { new Effect.Highlight("homeContentPanel",{}); Element.update("homeContentPanel", " \n \n Time\n Description\n Date Entered It''s as if it''s in debug mode. Thoughts? --~--~---------~--~----~------------~-------~--~----~ 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 24 Sep 2008, at 18:30, sullivan.t wrote:> > In my controller I have a simple "create" method and in the output > section, I have: > > format.js do > @traces = Trace.getLatest > render :update do |page| > page.visual_effect :highlight, :homeContentPanel > page.replace_html :homeContentPanel, :partial => "home/ > traceList", :locals => { :traces => @traces}, :layout => false > end > end > > The intent is to, of course, simply updated a div "homeContentPanel" > with the results of a partial. The partial that is _normally_ a part > of the div anyway. >> What I get is a completely odd formatted output. A sample is below. > > Try { new Effect.Highlight("homeContentPanel",{}); > Element.update("homeContentPanel", " > \n \n Time\n Description\n Date Entered > > It''s as if it''s in debug mode. > > Thoughts? >Your link_to_remote, form_remote_tag etc... is using an :update option which means "stick the response from the server in this element" but you''re using a render :update block which means "generate some javascript to perform some changes" Do one or the other, but not both. Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
...oh.... oh... right. I knew that. You passed. Thanks a billion. :) On Sep 24, 1:34 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 24 Sep 2008, at 18:30, sullivan.t wrote: > > > > > > > In my controller I have a simple "create" method and in the output > > section, I have: > > > format.js do > > @traces = Trace.getLatest > > render :update do |page| > > page.visual_effect :highlight, :homeContentPanel > > page.replace_html :homeContentPanel, :partial => "home/ > > traceList", :locals => { :traces => @traces}, :layout => false > > end > > end > > > The intent is to, of course, simply updated a div "homeContentPanel" > > with the results of a partial. The partial that is _normally_ a part > > of the div anyway. > > > What I get is a completely odd formatted output. A sample is below. > > > Try { new Effect.Highlight("homeContentPanel",{}); > > Element.update("homeContentPanel", " > > \n \n Time\n Description\n Date Entered > > > It''s as if it''s in debug mode. > > > Thoughts? > > Your link_to_remote, form_remote_tag etc... is using an :update option > which means "stick the response from the server in this element" but > you''re using a render :update block which means "generate some > javascript to perform some changes" > > Do one or the other, but not both. > > Fred--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---