I know how to use Ajax.Updater to fetch a url and display it inside a div. But I am wondering if there is a way to fetch a specific div within that url and display that instead of the whole page? You may be wondering why I want to do this. The reason is, i want to link to a url like i normally would so if javascript is turned off, they get a full page with headers, logos, nav etc. But for the ajax call I obviously only want the content on the page instead of the whole page. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You may want to look into RESTful design patterns, this is exactly what is intended to do (and a whole lot more): http://www.google.com/search?q=restful+rails Although there is a lot of info on Rails-specific techniques for making your application RESTful, the basic idea is the same everywhere. Background info: http://en.wikipedia.org/wiki/REST -justin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I am not using rails. This is a very small non-dynamic website. On Jan 17, 8:58 pm, "Justin Perkins" <justinperk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You may want to look into RESTful design patterns, this is exactly > what is intended to do (and a whole lot more):http://www.google.com/search?q=restful+rails > > Although there is a lot of info on Rails-specific techniques for > making your application RESTful, the basic idea is the same > everywhere. > > Background info:http://en.wikipedia.org/wiki/REST > > -justin--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
If it''s non-dynamic, you''ll either have to duplicate content, parse the responseText (as if it was a string) or insert the new content in an iFrame and grab the div you want from there. imho the simplest solution remains the first one. Best, Tobie On Jan 18, 6:21 am, anathema <spamfreeunive...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am not using rails. This is a very small non-dynamic website. > > On Jan 17, 8:58 pm, "Justin Perkins" <justinperk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You may want to look into RESTful design patterns, this is exactly > > what is intended to do (and a whole lot more):http://www.google.com/search?q=restful+rails > > > Although there is a lot of info on Rails-specific techniques for > > making your application RESTful, the basic idea is the same > > everywhere. > > > Background info:http://en.wikipedia.org/wiki/REST > > > -justin--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Simple? Let''s see I would have to learn Rails, learn how to be a system administrator so I could set up and deploy the app, then learn REST. Does anyone have an actual answer to my question on how to accomplish this with prototype? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Jan 17, 11:44 pm, anathema <spamfreeunive...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Does anyone have an actual answer to my question on how to accomplish > this with prototype?Tobie gave you two answers. I''ll add a third: if the response is well- formed XHTML, you can parse it as such with DOM methods -- by using XMLDOM in IE (google it) and by the responseXML property in all other browsers. Does this qualify as an "actual" answer? If not, I''m prepared to give you a full refund. Cheers, Andrew --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
By first solution, I meant: duplicate your content, i.e. have a page with the full HTML, and a copy of that page with only the content you want to inset via your ajax request. On Jan 18, 6:44 am, anathema <spamfreeunive...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Simple? Let''s see I would have to learn Rails, learn how to be a > system administrator so I could set up and deploy the app, then learn > REST. > > Does anyone have an actual answer to my question on how to accomplish > this with prototype?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Jan 17, 2008 11:21 PM, anathema <spamfreeuniverse-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I am not using rails. This is a very small non-dynamic website.I said in my original reply that REST-style is not limited to rails. The ability for a static website to utilize Ajax seems extremely limited. -justin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
sounds to me like the end goal is to grab someone elses content when they don''t provide an RSS feed or other means to gain access to their content On Jan 18, 2008 9:14 AM, Justin Perkins <justinperkins-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On Jan 17, 2008 11:21 PM, anathema <spamfreeuniverse-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > I am not using rails. This is a very small non-dynamic website. > > I said in my original reply that REST-style is not limited to rails. > > The ability for a static website to utilize Ajax seems extremely limited. > > -justin > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---