-
New Feature
-
Resolution: Won't Fix
-
Normal
-
7.0.4
-
None
-
Security Level: Jimmy
-
None
-
ZK 8.0.1
-
None
Requirement Description
When we load an external script like
zk.loadScript('http://ende.de/test.js', 'myscript');
It might fail to load the external script. In such case, the whole application will halt on Processing message and go timeout with the message:
Error code 1: ZK error, before mounting. ...
Although users can see an error message in developer tool. Maybe ZK can check a script's existence before loading.
Current Workaround
Check before loading like:
http://www.kirupa.com/html5/checking_if_a_file_exists.htm
http://stackoverflow.com/questions/3646914/how-do-i-check-if-file-exists-in-jquery-or-javascript
Proposed solution
allow to pass a callback function. ZK calls the callback function after loading is done and pass the loading status no matter succeed or fail.