#12983 closed bug (notabug)
$.getJSON or $.ajax with jsonp type, not returning data
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
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.
$.getJSON('http://suggestqueries.google.com/complete/search?output=firefox&client=firefox&hl=en-US&callback=?&q=market', function(data,status){ $.each(data, function(i,item){alert(item.x);}); });
Change History (3)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
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
Description: | modified (diff) |
---|
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).