On Monday 22 January 2007 11:51, Shannon wrote:
> sounds beyond my noobness.

Fair enough, it isn't a straightforward approach, as I said.

> > I'm not sure what problem you're trying to solve,
>
> nothing specific really. just playing with, and getting to know what
> prototype can do. i am honestly surprised that receiving the contents
> of a specific div, instead of a whole page isn't built into
> prototype. Here is a situation I would use it in, and I would think
> this would be common...
>
> Let's say the user is presented with a link. When the user clicks on
> the link we want to update a div with with the content of the page
> that the link points to. but we obviously do not want to update it
> with a whole page containing navigation and other elements. we just
> want to give them the content. I could just put the content in
> generic html file that does not have a doc type, or meta info, or
> navigation - just a block of content. But if i did that, users who
> have javascript turned off will not see a fully functional page. That
> last bit is the major motivation for wanting to be able to fetch a
> specific div instead of the whole page.
>

You'd be better off factoring out the part of the page that you want to 
consume on the server. It's unusual for an ajax app to make requests to URLs 
that serve complete HTML pages. Usually, you'd write specific URLs for the 
ajax calls that contain only fragments of HTML content, or even data encoded 
as JSON or XML, or whatever.

HTH

Dave
-- 
----------------------
Author
Ajax in Action http://manning.com/crane
Ajax in Practice http://manning.com/crane2
Prototype & Scriptaculous Quickly http://manning.com/crane3

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to