Error loading js file in getScript

Asked By 20 points N/A Posted on -
qa-featured

I can’t seem to work around this problem that comes up whenever I use Stackoverflow or Google; can someone help me out? When I load a js file in getScript I receive the following error message:

“Error: not well-formed

Source File: file:///G:/ct/main/main.js?_=1335346352617

Line:1, Column:1”

 

Has anyone ever encountered this? Kindly help me out! Thanks!

SHARE
Answered By 0 points N/A #145610

Error loading js file in getScript

qa-featured

Good day to you !

I think it must be do with the mime type of the requested document.

If it's operating on your server, make certain that it knows what to perform with .js files. It should return

/javascript.

If not then it ought to absolutely work when requested like this:

varreq = newXMLHttpRequest();
req.open("GET", "filename.js");
req.overrideMimeType("text/javascript");
req.send(null);

I hope I helped you in this problem. This is a very rare error and solutions for this are not readily available on the net. Please respond so we can figure it out and help the future individuals who’d be troubled with this issue.

Login/Register to Answer

Related Questions