How to run script only once (at the loading of a given form) ?

1
0
-1

Hello,

I have a form using Bonita and a script that load all the items from my database.

I would like to be able to run a Javascript function that run only ONCE when the form is loaded from the user to get all my items and store it locally (temporary)

Any suggestions will be highly appreciated.

Best regards,

Comments

Submitted by julien.mege on Wed, 04/01/2020 - 17:56

hello, is it a UI-Designer form ?

in any case did you try to use "window.onload"?

Submitted by sabbe.kev_1422207 on Thu, 04/09/2020 - 04:53

Hello, yes and it did fix the issue :)

1 answer

1
+3
-1
This one is the BEST answer!

Nice, so can you validate this answer,

- Use the JavaScript method "window.onload" to run script only once at the loading of a given form.

to make it more visible for community.

thx.

Comments

Submitted by sabbe.kev_1422207 on Thu, 04/09/2020 - 09:09

done thank you!

Notifications