On Dec 8, 9:30 pm, macsig <[EMAIL PROTECTED]> wrote:
> Hello,
> I have an issue with Ajax.updater.
> Since I'm a prototype newbie I guess it is something easily solvable.
>
> Basically I don't understand what I have to put as url.
> In any example I can find on prototype website they show '/some_url'
> without specifying its meaning.
>
The url is entirely up to you. It is the URL of the script that you
write to be the Ajax backend: you can call it what you like, and put
it where you like (though it introduces many problems if it isn't on
the same domain as the script it's being called from).

> Since my app is a Rails one I tried to create a partial (list_item)
> with the list item and I passed it as a url but I get "Couldn't find
> Person with ID=list_item
> If I remove the url parameter I get "
> ActionController::MethodNotAllowed   Only get, put e delete requests
> are allowed." even if I specify get as a method.

I don't know Rails, but if it's anything like symfony, a partial isn't
enough: it needs to be its own page, which will parse the arguments
from the query string, generate the output, and send it with the
proper headers. It could be bare text, XML, HTML or it could be empty
and return the data in an X-JSON heaader. But if you're going to use
Ajax.Updater, you need to return an HTML fragment (not a whole HTML
page). In any case, though, it needs to have suitable HTTP headers.
I'm guessing that Rails has a way of creating a page which only
returns the headers and text you want.

Colin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to