Chris, could you file a bug? http://prototype.lighthouseapp.com/projects/8886-prototype/overview
- kangax On May 27, 9:42 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > @kangax I am using String#evalJSON. My function is just a wrapper > around it to catch the exception that keeps coming up. > > On May 27, 12:22 am, kangax <[EMAIL PROTECTED]> wrote: > > > Prototype already has > > String#evalJSONhttp://prototypejs.org/api/string/evalJSON > > > - kangax > > > On May 26, 7:41 pm, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > Sure. I have a wrapper function String#evalJSON that I'm using to > > > eval my JSON, and also to catch that exception. Also, I'm using PHP > > > 5's json_encode to build out my JSON. Anyone hear of bugs with that > > > function? > > > > new Ajax.Request(url, { > > > method : 'post', > > > parameters : params, > > > onComplete : function(transport) { > > > var myJSON = jsonTransport(transport); > > > > //do stuff with myJSON > > > > } > > > }); > > > > function jsonTransport(transport) { > > > try { > > > return transport.responseText.evalJSON(); > > > } catch (e) { > > > console.log(e, transport) > > > } > > > > } > > > > On May 25, 9:36 am, "Frederick Polgardy" <[EMAIL PROTECTED]> wrote: > > > > > Can we see a small code sample? It's hard to see what's going on just > > > > from > > > > the description. > > > > > On Sat, May 24, 2008 at 2:36 PM, [EMAIL PROTECTED] < > > > > > [EMAIL PROTECTED]> wrote: > > > > > > Hello all, > > > > > > I'm using prototype in conjunction with Extjs to build out an Ajax- > > > > > driven app. I'm noticing that occasionally there will be Ajax > > > > > Requests that will occasionally not complete. After some > > > > > investigation, I found that when I made a call to String#evalJSON, it > > > > > would throw a TypeError with the following message : > > > > > > transport.responseText has no properties. > > > > > > When this happened, I use firebug to log both the error and the > > > > > transport object. When I inspect the transport object, > > > > > transport.responseText is definitely there, and well-formed. > > > > > > Has anyone else encountered this behaviour? > > > > > -- > > > > Science answers questions; philosophy questions answers. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---