Skip to main content

Bug Tracker

Side navigation

#14094 closed bug (notabug)

Opened July 02, 2013 02:45PM UTC

Closed December 16, 2013 04:55PM UTC

$.getScript Internet Explorer

Reported by: 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)
Attachments (0)
Change History (15)

Changed July 02, 2013 03:22PM UTC by anonymous comment:1

 $.getScript('failscript', successCallback)

Changed July 04, 2013 05:04PM UTC by timmywil comment:2

resolution: → worksforme
status: newclosed

I am unable to reproduce:

Changed July 05, 2013 07:25AM UTC by comment:3

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

Changed July 05, 2013 07:45AM UTC by comment:4

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

Changed July 05, 2013 01:26PM UTC by timmywil comment:5

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.

Changed July 05, 2013 01:27PM UTC by timmywil comment:6

status: reopenedopen

Changed July 08, 2013 03:34PM UTC by anonymous comment:7

the same issue with $.getJSON

Changed September 09, 2013 09:54PM UTC by anonymous comment:8

I guess you are getting this console message only in

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

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

Changed September 10, 2013 06:41AM UTC by comment:9

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.

Changed September 12, 2013 10:37PM UTC by anonymous comment:10

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).

Changed September 13, 2013 06:16AM UTC by anonymous comment:11

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=""></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'' '''

Changed September 13, 2013 01:48PM UTC by anonymous comment:12

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.

Changed September 16, 2013 01:21AM UTC by dmethvin comment:13

milestone: 1.10.3/

Bulk update for new milestone

Changed December 11, 2013 02:10AM UTC by comment:14

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

Changed December 16, 2013 04:55PM UTC by dmethvin comment:15

resolution: → notabug
status: openclosed

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