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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:16:59+00:00 2026-05-24T14:16:59+00:00

This is my Javascript $.ajax({ url: url, dataType : json, async : false, success

  • 0

This is my Javascript

$.ajax({
    "url": url,
    "dataType" : "json",
    "async" : false,
    "success" : function(e) {
        retval = e;
    },
    "complete" : function(jqXHR, textStatus) {
        debugger;
    },
    "error" : function(jqXHR, textStatus, errorThrown) {
        debugger;
    },
    "xhrFields": {
       withCredentials: true
    }
})

url is for example http://api.justin.tv/api/channel/show/{0}.json ({0} being replaced by a channel name)

The script breaks at error with textStatus “parseserror”. Also I notice that jqXHR has no responseText, but instead all the json files I tried to load have appeared in the resources tab with Uncaught SyntaxError: Unexpected token :. Also I’m getting the warning Resource interpreted as Script but transferred with MIME type application/json. for every ajax request. In addition, the x-domain requests doesn’t seem to be asynchronous since code below the ajax call executes before the error callback executes.

So to clarify, my goal is for the ajax call success callback to run on every request with the parsed JSON object as e. This code already works for local json ajax calls, just not with the x-domain ones. The json returned by the x-domain calls is valid and shouldn’t result in parsererrors.

If anyone has any ideas, please share

Thanks

  • 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-24T14:17:00+00:00Added an answer on May 24, 2026 at 2:17 pm

    You’re going to need to look into jsonp support in $.ajax() — http://api.jquery.com/jQuery.ajax/

    You’re violating the same origin policy, where you can’t make XmlHttpRequests to domains outside of yours. JSONP allows you to get around this.

    I don’t know if justin.tv supports JSONP; basically, it needs to wrap the response that it’s sending you inside of the method that’s provided by the JSONP call.

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

Sidebar

Related Questions

Is this a valid url parameter in jquery.ajax(), <script type=text/javascript> $(document).ready(function() { getRecordspage(); });
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js></script> <script type=text/javascript> function bigtosmalltriangle() { $(this).siblings(div.break).removeClass('triangle3').addClass('triangle1'); setTimeout ( smalltomediumtriangle(), 400 ); }
I executing a function like this, <script type=text/javascript> $(document).ready(function() { getEntities(Clients/GetClients, 0, formatClientsResult); var
On my website I use a long polling jquery ajax function. This ajax call
i have the following javascript file named coupon.js - jQuery(document).ready(function(){ jQuery('.appnitro').submit( function() { $.ajax({
Why does this javascript return 108 instead of 2008? it gets the day and
I have this Javascript data: [{id:123,type:test},{id:154,type:another}] How would you transform that into something so
This is javascript, but a virtually identical regex is failing in PHP too, so
In JavaScript this was a cross-browser compatibility issue, so both were used, but there
I already started this in javascript so I don't want to use jquery but

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.