[SOLVED] How to: Javascript integration of a 3rd party js file

Answered
0
0

Hello,

I need an example for JS integration of a 3rd party js file in Wisej. I tried it with the widget control but without success.

I need a plain sample how and where to add code in Wisej, I tried to understand the ChartJS extension project, but was not able to get the clue.

Thx

Johann

  • You must to post comments
Best Answer
0
0

Or if it’s js code you want to connect to a wisej widget, you can use the JavaScript component. Drop it on a page or form, set the source to the file. It will load when the form or page are shown.

If it’s a js library that you want to load dynamically instead of using the <script>tag use using Wisej.load or wisej.utils.Loader:

In javascript for dynamic loading:

Wisej.load(“myurl/myjs.js”);

Wisej.load(“myurl/myjs.js”, callbackWhenLoaded);

Wisej.load([“myurl/myjs1.js”, “myurl/myjs2.js”]);

Wisej.load([“myurl/myjs1.js”, “myurl/myjs2.js”], callbackWhenAllAreLoaded);

or

wisej.utils.Loader.load([

{id: “lib1″, url:”lib1.js”},

{id: “lib2″, url:”lib2.js”},

], callbackWhenAllLoaded);

Otherwise the plain dynamic loading in javascript is to create the <script> which you can also do with Wisej since it’s just a single html page.

 

HTH

 

  • You must to post comments
0
0

Wisej.Web.Widget is to integrate javascript widgets.

For a javascript file you can include in the Default.html like you’d do in a plain web page.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.