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 6783655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:53:35+00:00 2026-05-26T16:53:35+00:00

I call $.getJSON(‘http://localhost:8000/polls/?callback=?’, function(data) and recieve an error: Error: parsererror errorThrown: jQuery16103397698865741826_1320825997345 was not

  • 0

I call

$.getJSON(‘http://localhost:8000/polls/?callback=?’, function(data)

and recieve an error:

Error: parsererror errorThrown: jQuery16103397698865741826_1320825997345 was not called

If I call a json file that is next to my html file it works fine.
If I call the google example url: http://www.highcharts.com/samples/data/jsonp.php?filename=aapl-c.json&callback=? it also works.

Any ideas? I think that maybe it has something to do with DJango or the way I return from my server side code.

index(request):

    a = {}
    a[1320675940] = 1.8
    a[1320675941] = 2.8
    a[1320675942] = 38
    a[1320675943] = 4.8
    a[1320675944] = 5.8
    a[1320675945] = 6.8
    a[1320675946] = 7.8

    data = simplejson.dumps(a)

    return HttpResponse(data, mimetype="text/plain")
    #return HttpResponse(data, mimetype="json")
    #return HttpResponse(str(data), mimetype="text/plain")
  • 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-05-26T16:53:35+00:00Added an answer on May 26, 2026 at 4:53 pm

    You are returning JSON (with a plain text content-type), not JSON-P.

    You need to look at the value of callback in the query string and wrap the JSON in that function call.

    e.g. for ?callback=foo:

    foo(/* Your JSON here */);
    

    You should also use the correct content type (application/javascript).

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

Sidebar

Related Questions

I have the following code snippet: $.getJSON(http://localhost:8080/images, function(data) { var items = []; $.each(data,
I call my JavaScript function. Why do I sometimes get the error 'myFunction is
Basically I have a getjson call to call for a bunch load of data.
I am performing the following AJAX call: $(document).ready(function() { $.getJSON('https://sendgrid.com/api/user.stats.json', { 'api_user': 'me@mydomain.com', 'api_key':
Inside the callback of a $.getJSON call, I have the code outlined below. The
I have the following javascript: $.getJSON('/calculate_quote/' + moulding_1_id, function(data) { moulding_1_cost = data.moulding.cost; moulding_1_width
here is my jQuery $.getJSON('/users/delete_preapproval', { preapproval: $(this).attr('id'), id: $(this).attr('id') }, function(data) { complete:
In a JQuery getJSON call, how can I tell the length of the JSON
I call a javascript function from a textbox by using OnKeyPress=clickSearchButton() Here is my
I call the following function with a mouseover event but it's not working. My

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.