Hi everyone,
I’m encountering a small problem with the Widget.
I’m using more than 4 Packages and there are all needed to be downloaded from the internet, on the Window Load event i used Widget.Call(“function”), but at the first run the Widget hasn’t downloaded all the packages and tried to do che JavaScript function.
I tried implementing some coding like:
$(window).bind('load', function(){ });
window.onload = function () { alert("It's loaded!") }
document.addEventListener("DOMContentLoaded", function(event){});
$( document ).ready(function() {
})
but the Widget seems to ignore it and don’t execute the code inside.
It will be nice to have an Event on the Packages loaded or something like that.
Or maybe there is a better way to do that?
Regards,
Alex.
Hi Alexandru,
You should be able to handle the completion of the packages load through the “init” event of the widget. With this event (in InitScript property) you can call something like:
this.fireWidgetEvent(“ready”);
You might find this documentation useful: https://wisej.com/docs/2.0/html/P_Wisej_Web_Widget_InitScript.htm
I hope this helps, please let me know if you need any clarification or have any mores questions!
Best,
Levie
Please login first to submit.