Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12983 closed bug (notabug)

$.getJSON or $.ajax with jsonp type, not returning data

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.3
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by jaubourg)

So this is the code, and the problem is that atleast with google suggestion it will never get to parse the function(data,status) no matter what. And bugzilla reports that the jsonp call is being made, that status is 200, and that there is a response. Moreover i did try the same thing with $.ajax request on jsonp, the success case is never parsed.

  $.each(data, function(i,item){alert(item.x);});

Change History (3)

comment:1 Changed 10 years ago by anonymous

Note that alert(item.x) is fictional, even if a console.log inside function(data, status){} is more than enough to track if it's actually getting in that case (wich doesn't).

comment:2 Changed 10 years ago by jaubourg

Resolution: notabug
Status: newclosed

http://suggestqueries.google.com/complete/search?output=firefox&client=firefox&hl=en-US&callback=?&q=market returns a JSON object not a JSONP response (that is not a call to a function with the actual data as the first argument).

Please, look up the documentation for google's webservice to see if there is a way to request a proper JSONP response or ask for help on the jQuery forums.

comment:3 Changed 10 years ago by jaubourg

Description: modified (diff)
Note: See TracTickets for help on using tickets.