On Oct 2, 10:46 am, Richard Quadling <[email protected]> wrote:
>
> What headers are you supplying with the JSON'd data from the server?
>
> For JSONP, I use Content-type: application/javascript
> For JSON, I use Content-type: X-JSON
>
> These work great for me.

Thanks for the reply.

The server code wasn't setting headers explicitly so I've now added
this, setting it to application/json, and I get a return value in the
second parameter. This now saves me needing to do the eval on the
responseText, but my original problem still exists in that having
upgraded to prototype 1.6.0, the original code no longer works unless
I convert the reply to hash using $H(). I don't know if this is now
the correct way of handling this, or whether I should be doing
something else, or whether it is a bug. As far as I can tell, the
purpose of the code was to extend the evaluated response text to add
iterator methods. When I compare the old and new version responses I
can see no difference, but something has changed between the prototype
versions as the object.extend now causes the code to fail when I try
to iterate using object.each.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to