Skip to content

Commit e0ac605

Browse files
committed
getScript issue; will revert2
1 parent 775c292 commit e0ac605

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

sources/net.sf.j2s.java.core/srcjs/js/j2sApplet.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,12 +313,23 @@ window.J2S = J2S = (function() {
313313
}
314314

315315
J2S.$getScriptAsync = function(file, whenDone) {
316+
// bad news: if the file does not exist, this fails to call any error. apparently fixed in JQuery 2.0
317+
316318
if (J2S._nozcore) {
317319
file = file.replace(/\.z\.js/,".js");
318320
}
319-
return $.getScript(file, whenDone);
321+
return J2S.$ajax({
322+
url: file,
323+
type: "GET",
324+
dataType: "script",
325+
cache: "NO",
326+
statusCode: { 404: function() {alert("!")}},
327+
success: whenDone,
328+
error: whenDone
329+
});
320330
}
321331

332+
322333
var fixProtocol = function(url) {
323334
if (!J2S._isFile && url.indexOf("file://") >= 0)
324335
url = "http" + url.substring(4);

0 commit comments

Comments
 (0)