I am trying to launch a javascript for adding extra functionality to a form run. The script must be launch when the form is loaded.
The idea is:
<xxf:script ev:event="xforms-enabled">
alert('hello world');
</xxf:script>
The problem is, as described at the Orbeon Forum, the "xforms-enabled" event is launched several times (for each control and variable). In the forum is described some workarounds and solutions, but cannot be applied when using javascript (or I do not know how to do it).
The question is: how can I execute the javascript code only one time when starting the form? Must I use another event?