hey, i was wondering if its possible to use an Ajax.Updater which load a given page into a container .. but instead of parsing the html i would like to see the actual source code ... i could not find anything in prototype. thanks for advice! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey, michal wrote:> hey, > i was wondering if its possible to use an Ajax.Updater which load a > given page into a container .. but instead of parsing the html i would > like to see the actual source code ... i could not find anything in > prototype.I think you should use Ajax.Request, .escapeHtml the response in onComplete/onSuccess and then .update the placeholder: new Ajax.Request(url, { onSuccess: function(transport) { $(placeholder).update(transport.responseText.escapeHTML()); } }); Regards, Szymon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
thanks! this works great On Tue, May 13, 2008 at 2:40 PM, SWilk <wilkolazki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hey, > > michal wrote: > > hey, > > i was wondering if its possible to use an Ajax.Updater which load a > > given page into a container .. but instead of parsing the html i would > > like to see the actual source code ... i could not find anything in > > prototype. > > > I think you should use Ajax.Request, .escapeHtml the response in > onComplete/onSuccess and then .update the placeholder: > > > new Ajax.Request(url, { > onSuccess: function(transport) { > $(placeholder).update(transport.responseText.escapeHTML()); > } > }); > > Regards, > Szymon > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---