Hi there, Suppose: ''action A'' was launched by an Ajax request Question: Is it possible to - somehow render a whole HTML page (not only return a part of the page), or - redirect (within ''action A'') to an ''action B'' (which then could render a whole HTML page) Thanks a lot! Tom -- Posted via http://www.ruby-forum.com/.
Sijo Kg
2009-Jul-10 10:48 UTC
Re: Render a whole HTML page after an Ajax request: possible
> Question: Is it possible to > - somehow render a whole HTML page (not only return a part of the page),render :update do |page| page.redirect_to :action => ''name'' end Sijo -- Posted via http://www.ruby-forum.com/.
And I''d been starting to think I had to call McGyver... Great! Thanks, Sijo! -- Posted via http://www.ruby-forum.com/.
Andrew Timberlake
2009-Jul-11 06:11 UTC
Re: Render a whole HTML page after an Ajax request: possible?
On Fri, Jul 10, 2009 at 12:36 PM, Tom Ha <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi there, > > Suppose: ''action A'' was launched by an Ajax request > > Question: Is it possible to > - somehow render a whole HTML page (not only return a part of the page), > or > - redirect (within ''action A'') to an ''action B'' (which then could render > a whole HTML page) > > Thanks a lot! > TomYou can return an entire HTML page via ajax (Just the contents of the <body> tags) and just replace that. If you''re going to redirect, don''t bother with the Ajax Andrew Timberlake http://ramblingsonrails.com http://MyMvelope.com - The SIMPLE way to manage your savings