Bug Tracker

Opened 9 years ago

Closed 9 years ago

#6882 closed bug (invalid)

BUG in IE

Reported by: JMC Owned by:
Priority: Milestone: 1.4
Component: attributes Version: 1.4.1
Keywords: JSON Cc:
Blocked by: Blocking:

Description

Only in IE I just tested it with IE8 so far but probaly the error is there for other IE versions as well then. I got an error message, that error at the API "an exception was thrown but not cought" at line 488. I use this url: http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.js

I did a JSON parsing with jquery

[code]

var JSONresponse = {"request":"/statuses/update.json?in_reply_to=&in_reply_to_status_id=&%29%20Bayer%2004%20Leverkusen%20csapat%C3%A1t%20ir%C3%A1ny%C3%ADtva%20ma%20legy%C5%91ztem%20a%28z%29%20Hertha%20BSC%20csapat%C3%A1t%204%20-%200%20ar%C3%A1nyban%21%20-%20&oauth_signature=6YcpvrShgGojD%2BU95uvkRDgcX7E%3D","error":"Status is a duplicate."};

parsing the JSON response for proper error handeling

var JSONObject = jQuery.parseJSON(JSONresponse); if (typeof JSONObject.error != "undefined"){

switch (JSONObject.error){

case "Status is a duplicate.": {

TwitterError = "DUPLICATE"; break;

} case "Client must provide a 'status' parameter with a value.": {

TwitterError = "NO_STATUS"; break;

} default: {

TwitterError = "GENERAL_ERROR"; break;

}

}

}

code

but im just guessing.

Change History (1)

comment:1 Changed 9 years ago by dmethvin

Resolution: invalid
Status: newclosed

jQuery.parseJSON() takes a string and parses it. You're trying to pass in an object rather than a string.

If you need more help, ask on the forum.

Note: See TracTickets for help on using tickets.