henry.christopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-May-24 19:36 UTC
TypeError : transport.responseText has no properties
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? Best, Chris henry --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Polgardy
2008-May-25 13:36 UTC
Re: TypeError : transport.responseText has no properties
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, henry.christopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org < henry.christopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
henry.christopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-May-26 23:41 UTC
Re: TypeError : transport.responseText has no properties
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" <f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> 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, henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org < > > > > henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Prototype already has String#evalJSON http://prototypejs.org/api/string/evalJSON - kangax On May 26, 7:41 pm, "henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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" <f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> 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, henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org < > > > henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
henry.christopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-May-27 13:42 UTC
Re: TypeError : transport.responseText has no properties
@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 <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Prototype already has String#evalJSONhttp://prototypejs.org/api/string/evalJSON > > - kangax > > On May 26, 7:41 pm, "henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" > > <henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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" <f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> 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, henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org < > > > > henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Chris, could you file a bug? http://prototype.lighthouseapp.com/projects/8886-prototype/overview - kangax On May 27, 9:42 am, "henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Prototype already has String#evalJSONhttp://prototypejs.org/api/string/evalJSON > > > - kangax > > > On May 26, 7:41 pm, "henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" > > > <henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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" <f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> 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, henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org < > > > > > henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---