Hi guys.
I have been hit by the error “Uncaught ReferenceError: Wisej is not defined” at a specific situation.
I have an Exit button which the user can click to exit the application. At this point I call Application.Exit() and I also have my Default.json set with “autoReload”: true. So, the user clicks Exit, the application Exits and Reloads itself. Works great. But at times, I don’t know what might be going on, at Reloading it will throw an error inside my Default.html, which has code to show a Splash screen and then carry on. I have attached a print screen from the Chrome Console at the time the exception is thrown.
Any ideas of what could be going on?
Thanks in advance.
Ivan
(Wisej 2.2.44.0 – C# – SQL Server)
That means that for some reason the <script> tag is running before the script tag in the head which shouldn’t happen. Try to put Wisej.onLoad = inside the first setTimeout or add
Wisej = Wisej || {}
at the top of your script.
Thank you Luca.
I added your second advice to the script. Below is what you meant, right?
<!--
carregando...
-->
Wisej = Wisej || {}
var splash = document.getElementById("splash");
var loadingProgress = document.getElementById("loading-progress");
splash.style.opacity = 1;
setTimeout(function () {
loadingProgress.style.width = "100%";
loadingProgress.style.left = "0%";
setTimeout(function () {
loadingProgress.style.width = "0%";
loadingProgress.style.left = "100%";
}, 3000);
}, 1);
Wisej.onLoad = function () {
var splash = document.getElementById("splash");
splash.parentNode.removeChild(splash);
}
Really strange… it happened again, now inside the first setTimeout.
Image attached.
Hi Luca.
I have this .js (DashboardClient.js) in my project in order to use the DevEx dashboard:
// load JSZip.
var script = document.createElement('script');
script.src = "https://cdnjs.cloudflare.com/ajax/libs/jszip/2.6.0/jszip.min.js";
document.head.appendChild(script);
Could this be affecting the Reload in some way?
Please login first to submit.