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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:17:07+00:00 2026-06-01T08:17:07+00:00

When trying to dynamically load a Javascript file using jQuery I keep getting a

  • 0

When trying to dynamically load a Javascript file using jQuery I keep getting a “not well-formed” error message. I have found people with similar problems on here but have yet to see a resolution provided.

My main script uses:

$.ajax({
    url: 'test.js',
    dataType: 'script',
    cache: true,
    success: loadScriptReturn
});

function loadScriptReturn() { }

My dynamically loaded script (test.js) in its simplest form:

alert('Hello World.');

Since I am specifically loading this as a script MIME type it eliminates the possibility that Firefox is confused as to what type of file is being pulled in. Is there a way to solve this problem? Alternatively, is there a way to shut off this specific error in Firefox? (note: this is an error, not a warning, which is extremely annoying because I do want to see subsequent error messages — bad on Firefox as this should have been a warning, not an error)

Keep in mind, this example WORKS, but it still produces an error. Given how many scripts I need to load dynamically it will be tedious trying to sort through “real” error messages if I can’t find a way to get rid of this.

Thank you in advance to contributors!

  • 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-01T08:17:09+00:00Added an answer on June 1, 2026 at 8:17 am

    I found several questions that may help you:

    • not well-formed error in firefox
    • "not well-formed" error in Firefox when loading JSON file with XMLHttpRequest

    The general consensus is that you need to change the MIME type to application/json.

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

Sidebar

Related Questions

I'm trying to dynamically load the phonegap javascript file (so that I can choose
I'm using jQuery 1.5.2 trying to dynamically load a div from one source into
I am trying to dynamically load a JavaScript file by adding a script element
I'm trying to dynamically spawn a video element on a page using JavaScript. JavaScript
I'm trying to dynamically add a css stylesheet rule using javascript, something like example
I need to dynamically load several JavaScript file assets in a very specific order
I am trying to dynamically load a KML file into a map depending on
I have a ul list that is dynamically generated upon page load via JavaScript.
I'm trying to dynamically create a form using JQuery. In order to do this,
Using the jqGrid i am trying to figure out how to dynamically load 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.