Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8770529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:34:25+00:00 2026-06-13T17:34:25+00:00

I am using $.getJSON to call a url and fetch JSON data at http://jsfiddle.net/9Desk/

  • 0

I am using $.getJSON to call a url and fetch JSON data at http://jsfiddle.net/9Desk/

Although the JSON is retrieved https://i.stack.imgur.com/GE6HI.png, I am unable to execute the success function.

$(function () {
    $.getJSON(url)
    .success(function (data) {
        alert(data);
        var listItems = ""; 
    });
});​

Can anyone tell me where am I going wrong and why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T17:34:26+00:00Added an answer on June 13, 2026 at 5:34 pm

    You need to treat the request as jsonp instead of plain json. To do so, just define the callback as callback=? instead of callback=listPlaces. From the documentation:

    If the URL includes the string “callback=?” (or similar, as
    defined by the server-side API), the request is treated as JSONP
    instead. See the discussion of the jsonp data type in $.ajax() for
    more details.

    DEMO.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

my problem is: When I call json using the following code var url=http://localhost:9000/json; $.getJSON(url,
I'm trying to call this api http://www.wikirandom.org/json Using this code - $.getJSON('http://www.wikirandom.org/json', function(data) {
Refer to the link : http://jsfiddle.net/LS8zs/ I tried to get JSON data using jQuery
I am attempting to pase a a JSON data using the JQuery getJSON function.
When using this code: <script> $(document).ready(function () { $.getJSON(http://twitter.com/statuses/user_timeline/USERNAME.json?callback=?, function(data) { if(data[0].text.length > 107)
I'm using this code: <script> $(document).ready(function () { $.getJSON(http://twitter.com/statuses/user_timeline/USERNAME.json?callback=?, function(data) { $(.show_tweet).html(data[0].text); }); });
I am retrieving JSON using jQuery's getJSON call. My problem is that some of
I'm using jQuery's $.ajax method to call getjson.php which returns a JSON object using
I'm using jQuery's $.getJSON() API to retrieve data from a given URL for a
I have a program that gets a JSON from the server using getJSON and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.