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

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,

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.

hello, is it a UI-Designer form ?

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

Hello, yes and it did fix the issue :)

done thank you!