Ghee wooi Ong
2007-Oct-25 03:03 UTC
ajax form for-how to refresh the <div> without any layout ?
hi, I got an ajax form that can post values to controller to create item.(simply an form_remote_for )then redirect to another page. however, the response is include the app/view/layout/application.rthml. so my refresh <div> nested into another page. is that any better way to doing this? -- 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 -~----------~----~----~----~------~----~------~--~---
Abhi Manyu
2007-Oct-25 03:20 UTC
Re: ajax form for-how to refresh the <div> without any layou
Ghee wooi Ong wrote:> hi, > > I got an ajax form that can post values to controller to create > item.(simply an form_remote_for )then redirect to another page. > > however, the response is include the app/view/layout/application.rthml. > so my refresh <div> nested into another page. > > is that any better way to doing this?Hi, I did''n get you. Anyway In order to refresh a particular div I uasually use :update =>"divname" -- 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 -~----------~----~----~----~------~----~------~--~---
Ghee wooi Ong
2007-Oct-25 03:32 UTC
Re: ajax form for-how to refresh the <div> without any layou
my code look like this: <% form_remote_for :location, :update=>''content'', :url => ''/create'', :html=>{:id =>''location''} do |f| %> ... <% end %> I had a <div>content</div> in my page, so it will be replace my the ajax response. but the only thing is it include the layout which I don''t want. is that any way to discard the layout? -- 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 -~----------~----~----~----~------~----~------~--~---
Abhi Manyu
2007-Oct-25 03:35 UTC
Re: ajax form for-how to refresh the <div> without any layou
Ghee wooi Ong wrote:> > my code look like this: > > <% form_remote_for :location, :update=>''content'', :url => ''/create'', > :html=>{:id =>''location''} do |f| %> > > ... > > <% end %> > > I had a <div>content</div> in my page, so it will be replace my the ajax > response. > but the only thing is it include the layout which I don''t want. > > is that any way to discard the layout?In the controller when you can give like render_without_layout : "view file name" this will help I hope -- 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 -~----------~----~----~----~------~----~------~--~---
Ghee wooi Ong
2007-Oct-25 07:03 UTC
Re: ajax form for-how to refresh the <div> without any layou
ok thx ! -- 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 -~----------~----~----~----~------~----~------~--~---