Bug Tracker

Modify

Ticket #6882 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

BUG in IE

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

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

comment:1 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.