I’m using this code to include dynamically js file in run-time:
var headID = document.getElementsByTagName("head")[0];
var script = document.createElement('script');
script.type='text/javascript';
script.src="js-debug/"+record.getId()+".js";
script.onload = function() {
inizializeComponent();
}
For every node of menu, I include a different js file.
Now I need to intercept the event triggered when the page does not exist to show a messagebox!
How can I get it?
Use
script.onerror = function () { ....