Hi,
I have a button : <button id='test' type='button'>Test !</button>
. If the button is clicked the following function is executed :
[php]function test() {
alert(“This is a test!”);
}[/php]
But if I place this : <script>
document.getElementById("test").addEventListener("click", test);
</script>
before the button it doesn’t work. It only works when I place if after the button. Is this normal ?