File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
sources/net.sf.j2s.java.core/srcjs/js Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -313,12 +313,23 @@ window.J2S = J2S = (function() {
313
313
}
314
314
315
315
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
+
316
318
if ( J2S . _nozcore ) {
317
319
file = file . replace ( / \. z \. j s / , ".js" ) ;
318
320
}
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
+ } ) ;
320
330
}
321
331
332
+
322
333
var fixProtocol = function ( url ) {
323
334
if ( ! J2S . _isFile && url . indexOf ( "file://" ) >= 0 )
324
335
url = "http" + url . substring ( 4 ) ;
You can’t perform that action at this time.
0 commit comments