Le lundi 21 décembre 2009 13:05, T.J. Crowder a écrit :
> You're just looking in the wrong place. The second parameter to the
> onSuccess callback is the value of the X-JSON *header*, if any. It's a
> means of sending back extra data alongside the main response. You're
> sending JSON back in the body, not a header. To access that, just look
> at the `responseJSON` property of the response object (the first
> parameter to the onSuccess). E.g.:
>
> new Ajax.Request(url, {
> onSuccess: function(response) {
> // The decoded JSON data is available from
> // the response.responseJSON property.
> }
> });
Ok, I got it. Thanks :o)
--
Frédéric
--
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 [email protected].
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.