Hi, I have InfoWindow popups when users clicks a layer on my map. I am doing a lot of custom formating in these info windows and require having a html button in them. I can get the button to appear no trouble, but I can't get it's click event to work or call a function in my code.
I've tried multiple approaches including using:
<button id='myButton' onclick='myFunction();'>Label</button>
when I create the button in the InfoTemplate.setContent method. Doing this tells my that my function is undefined.
Also tried wiring the event in multiple location such as by using:
on(dom.byId("myButton", "click", function() {
console.log("test");
});
But nothing happens.
Thanks for the help!