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
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
Hi Johann,
If you´re looking for samples for javascript widgets, we have a couple like
https://wisej.com/blog/time-for-a-cool-smoothie/
https://wisej.com/blog/integration1/
https://wisej.com/blog/integration2/
https://wisej.com/blog/all-about-integration-part-3/
https://wisej.com/blog/all-about-integration-part-4/
https://github.com/iceteagroup/wisej-examples/tree/2.0/OrgChart
Otherwise see Luca´s reply.
Best regards
Frank
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.
Please login first to submit.