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

  • Home
  • SEARCH
  • 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 6155155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:23:16+00:00 2026-05-23T20:23:16+00:00

I’m trying to write up a simple jquery script that parses some JSON and

  • 0

I’m trying to write up a simple jquery script that parses some JSON and formats it. Nothing too special, but I keep getting the following error in Chrome: Resource interpreted as Script but transferred with MIME type text/html.

I’ve looked it up on SO and it looks like a fairly common question. I’ve followed every piece of advice I can find and still no luck yet. Here’s my code:

var url = "http://somesite.com/something/json/json_index.php?q=";
var query = "someQuery";

$.ajax({
  url: url + query + "&callback=",
  crossDomain:true, 
  dataType: 'jsonp',
  success: function(data){
    alert('all done!');
  },
  error: function(data){
    alert('fail.');
  }
});

Anyone have any ideas/suggestions?

  • 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-23T20:23:17+00:00Added an answer on May 23, 2026 at 8:23 pm

    JSON-P works by creating a <script> tag in your HTML document, and the remote server is expected to return yourCallback({the: data}). The error message sounds to me like the server is returning an HTML document instead, which could be a 404 error or something along those lines, or could just be the result of a misconfigured server (though that sounds unlikely if this is an API that’s been tested for JSON-P).

    Google Chrome’s Developer Tools also has a Network tab, so I’d recommend checking what request is being sent and what response you’re receiving. This sounds like something that we assorted StackOverflow users can’t exactly debug without knowing more about exactly what API you’re using, but you should hopefully be able to debug it with the tools you have 🙂

    I also note that you’re sending a URL ending with callback=, but the jQuery docs say you should use callback=?, with a question mark, so that jQuery can fill in a callback name. Maybe adding the ? is all you need.

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

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
I have just tried to save a simple *.rtf file with some websites and
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,

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.