Embedded forms - unable to set eventHandlers

Hello everyone,

i have an embedded html task form and a javaScript-file.
In the js-file i want to set some eventListeners to two buttons:

"document.addEventListener(“DOMContentLoaded”, initOwnWizard);
var currentTab = 0;

function initOwnWizard() {
alert(“in init”);
document.getElementById(“nextBtn”).addEventListener(“click”, setNext);
document.getElementById(“prevBtn”).addEventListener(“click”, setPrev);
openTab(currentTab);
}…"

Everything works fine outside the camunda tasklist, but when i deploy it to camunda the initOwnWizard()-function isn’t called anymore and so there are no listeners set.
I know that an other way to set eventListeners is the onclick-attribute in html, but i want to avoid that.

Does anyone know why this doesn’t work?

Thanks for your time and answers :slight_smile: