Hi,
On Oct 13, 7:30 pm, drewB <dbats...@gmail.com> wrote:
> On page
http://www.prototypejs.org/api/ajax/requestat the bottom when
> describing how JSON is handled it says that the JSON is evaluated and
> returned in the headerJSON property. It should say responseJSON. The
> same is true of the sample code.
Thanks for that, but actually, it's correct. That section is talking
about the X-JSON header ("Some backends will return JSON not as
response text, but in the X-JSON header..."). The X-JSON header is
deserialized and made available as headerJSON. So you can return HTML
(for instance) along with a bit of JSON in a header. You're thinking
of when the main content comes back as application/json, in which case
it is indeed available as responseJSON.
HTH,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com