Bug Tracker

Opened 10 years ago

Closed 9 years ago

#14094 closed bug (notabug)

$.getScript Internet Explorer

Reported by: [email protected] Owned by:
Priority: high Milestone: 1.11/2.1
Component: ajax Version: 1.10.1
Keywords: Cc:
Blocked by: Blocking:


If i call $.getScript on a script that doesn't exist (webserver returns html error page instead of script).

-> Internet Explorer in combination with jQuery 1.10.1 throw

SCRIPT1002: Syntax error 

  $.getScript('failscript', data, successCallback)

Change History (15)

comment:1 Changed 10 years ago by anonymous

 $.getScript('failscript', successCallback)

comment:2 Changed 10 years ago by timmywil

Resolution: worksforme
Status: newclosed

I am unable to reproduce: http://jsbin.com/irakez/1/edit

comment:3 Changed 10 years ago by [email protected]

with your code, I get a syntax error in IE9 and 10

comment:4 Changed 10 years ago by [email protected]

i'm getting the same error with your created script: SCRIPT1002: Syntax error runner, line 1 character 1 SCRIPT5007: Unable to get property 'proxyconsole' of undefined or null reference runner, line 7 character 3


i'm using IE10

comment:5 Changed 10 years ago by timmywil

Component: unfiledajax
Milestone: None1.10.3/2.0.4
Priority: undecidedhigh
Resolution: worksforme
Status: closedreopened

Ah, I was looking at the firebug lite console and the error went to the F12 console. There is an error there.

comment:6 Changed 10 years ago by timmywil

Status: reopenedopen

comment:7 Changed 10 years ago by anonymous

the same issue with $.getJSON

comment:8 Changed 9 years ago by anonymous

I guess you are getting this console message only in jsbin.com

Try using jsfiddle.net to reproduce this issue. Maybe we are actually debugging jsbin.com instead of jquery core. runner.js seems not to be a jquery part.

In jsfiddle the console output is something like "access denied".

comment:9 Changed 9 years ago by [email protected]

no we are getting this message also in a local testenvironment. if you build a simple html page and start it with the internet explorer 9/10.

comment:10 Changed 9 years ago by anonymous

sorry i was not even able to reproduce this error locally. I only get the console output "fail". What is expected.

can you provide us with some more information about your system (exact browser version, operating system).

comment:11 Changed 9 years ago by anonymous

I think your problem is you send the request just in a simple html page without a webserver. So your response in the Internet Explorer is nothing and you don't get an error. But try this page:

<!DOCTYPE html>
<meta charset=utf-8 />
<title>JS Bin</title>
  <div id="elem"></div>
  <script src="http://code.jquery.com/jquery-git.js"></script>
  $.getScript('test.html', function() {

name your page test.html and send the request to test.html (it's important you get some data!) then you get a syntax error in IE9/10

comment:12 Changed 9 years ago by anonymous

Ok. Now I was able to reproduce your issue. But in fact it is not a bug:

jQuery has a problem with your loaded content.

$.getScript functions expects a Javascript file to be loaded not html!

this is also specified in the jquery api documentation.


So I would not consider this as a bug and suggest to close this ticket.

comment:13 Changed 9 years ago by dmethvin

Milestone: 1.10.3/

Bulk update for new milestone

comment:14 Changed 9 years ago by [email protected]

I verified on IE 10 with jQuery version 2.1.0-pre, this issue has been fixed.

comment:15 Changed 9 years ago by dmethvin

Resolution: notabug
Status: openclosed

Javascript syntax errors can't be detected by the .error() for this case, as documented.

Note: See TracTickets for help on using tickets.