Hi Vance, I suggest you download the release candidate to version 1.5.1 and use the new built-in JSON parser instead.
Here's the link to the release candidate announcement: http://prototypejs.org/2007/3/9/prototype-1-5-1-rc1 and here's the link to the JSON tutorial: http://prototypejs.org/learn/json Hope this helps. Regards, Tobie On Mar 12, 2:06 pm, "vance" <[EMAIL PROTECTED]> wrote: > thank you. thank youa. thank you. the documentation is a bit > misleading. the api docs say the following under ajax requests: > "Any response whose MIME type is missing or JavaScript-related will > automatically be passed to eval." > > i hope my hair grows back. grin. > > On Mar 12, 1:04 am, Christophe Porteneuve <[EMAIL PROTECTED]> wrote: > > > Hi Vance, > > > Unless you're using the AJAX branch, which does feature JSON evaluation > > for the response body, the "json" argument you have relies exclusively, > > for now, on the X-JSON header. > > > I assume your JSON file is passed (as it should be) in the response > > body. If you're clean, you served that response with a JSON MIME type, too. > > > At any rate, what you need to get it working on 1.5.0 then is to > > manually eval your responseText, preferrably wrapped between > > parentheses. Something along these lines: > > > ... > > onComplete: function(transport) { > > var json = eval('(' + transport.responseText + ')'); > > // rest of your code here > > } > > > I believe that should do it. > > > -- > > Christophe Porteneuve a.k.a. TDD > > "[They] did not know it was impossible, so they did it." --Mark Twain > > Email: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
