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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:11:02+00:00 2026-06-15T04:11:02+00:00

I have the following code: $.ajax({ beforeSend: function () { console.log(fetching script); }, url:

  • 0

I have the following code:

$.ajax({
    beforeSend: function () {
        console.log("fetching script");
    },
    url: "../../../scripts/review-level-" + ig.game.currentLevel.toString() + ".js",
    dataType: "script",
    type: "GET",
    success: function (script) {
        console.log(reviewFunc());
    },
    error: function (jqXHR, textStatus, errorThrown) {
        console.log(errorThrown);
    }
});

I am trying to fetch a script using jQuery.ajax, I’ve tried the shorthand function $.getScript() as well, and I am getting a SyntaxError as the errorThrown in the error parameter, even though under the network tab in the chrome developer tool it shows the script as being successfully fetched with a status code of 200.
here is the script I am fetching:

function reviewFunc() {
    var overlay = ig.game.spawnEntity("EntityInfooverlay", 0, 0, {
        msg: {
            status: true,
            message: "Question #1:",
            counterOut: 0
        }
    });
    console.log("reviewFunc Finished");
    return overlay;
}

I can’t see any syntax errors in there so i’m kinda stumped. If anyone see’s anything i don’t or has encountered this before any help would be greatly appreciated.

  • 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-15T04:11:04+00:00Added an answer on June 15, 2026 at 4:11 am

    Might be easier to debug with some raw javascript:

    loadScript("../../../scripts/review-level-" + ig.game.currentLevel.toString() 
        + ".js", function() { reviewFunc(); });
    
    function loadScript(src, callback)
    {
        var s, r;
        r = false;
        s = document.createElement('script');
        s.type = 'text/javascript';
        s.src = src;
        s.onload = s.onreadystatechange = function() {
            if ( !r && (!this.readyState || this.readyState == 'complete') )
            {
                r = true;
                callback();
            }
        };
        document.body.appendChild(s);
    }
    

    EDIT

    Solution was found here.

    • 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: $.ajax({ type: GET, url: AJAX.ashx?job=fetch_calendar, dataType: html, success: function
I have the following code: doAjax = function () { $.ajax({ cache: false, url:
I have following scripts: function PostChartValues(meter_id, range_type_id, start_date, end_date) { $.ajax({ url: '@Url.Action(GetMeterReadingsTimeSeries, Widget)',
I have the following code: $.ajax({ async: false, url: 'chart_data.php', data: {'option':'high', 'id':id}, dataType:
I have the following code: $.ajax({ type: 'GET', url: 'index.php?route=checkout/onepagecheckout/getpaypaldata', dataType: 'json', success: function(json)
Hi I have the following code with jQuery: function reject(id) { $.ajax({ type: 'POST',
I have the following code that works on Firefox and Chrome $("#adicionarItem").click(function(){ $.ajax({ type:
I have the following code to make a jsonp call. var contacts; $.ajax({ url:
I have the following js code: var ret; $.ajax({ type: 'GET', url: '/Pay/Build64/', dataType:
I have the following code: $.ajax({ url: some-page.aspx, type: POST, data: {fileName: file, param02:

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.