>> This retrieves a whole page (some_url) and puts it in #products
>>
>> new Ajax.Updater('products', '/some_url', { method:'get' });
>>
>> Is there a way to retrieve a specific div on that page instead of
>> getting the whole page?
>
> OK, so essentially, you're willing to transmit a whole freakin page
> over
> the wire, then hack through its XHTML/DOM, when you really should
> have a
> server action that renders the exact content you need, right?
You would be correct if I was building large content heavy site, but
the scenario I had in mind would probably be for a small, other was
static site.
>
> This is what partials are for. You should request on a URL whose
> job it
> is to render exactly what you need, nothing more. This is very
> easy on
> Rails, with RJS templates (or failing that, with partials), and
> this can
> also be done in other backends by properly modularizing your view
> layer
> (using stuff like Tiles, portlets, or run-of-the-mill includes).
Again, I see your point if I was building a web app with rails, but I
am simply trying to add some functionality to a small site.
I could use php includes, but sometimes that would even be too much.
Imagine this scenario.
Let's say i want to link to a particular answer on a faq page. the
answer is in it's own container with a named anchor. even if that faq
page was using a php include for the content, it would most likely be
all the questions and answers, and not an include for each question
answer.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---