Skip to content

Widget Packages Load #2104

Closed
Closed

Description

@itg-assistant

Alexandru asked 2019-03-29 15:07:02 UTC

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.

Activity

  1. itg-assistant commented on Jun 13, 2026

    @itg-assistant
    Author

    Levie (ITG) answered 2019-03-29 20:33:53 UTC

    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

  2. itg-assistant commented on Jun 13, 2026

    @itg-assistant
    Author

    Alexandru answered 2019-03-30 08:04:38 UTC

    Hi Levie,
    First of all thank you for the response.

    I used the code as you suggested and it worked fine.

    Regards,
    Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions