#121 √ inactive
Chris Henry

TypeError : transport.responseText has no properties

Reported by Chris Henry | May 27th, 2008 @ 07:45 PM

Occasionally, String#evalJSON will throw a typeError which states that transport.responseText has no properties. Logging transport and inspecting shows the responseText is indeed there.

A quick code sample:

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)
    }

}

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The Prototype JavaScript library.

Shared Ticket Bins

Tags