InnerHTML Select Menu onChange Call

Trying to get a javascript alert to be called from onChange in Select Menu.

I know i’m going to kick myself when it is revealed. Here is my test project

javascriptCall.hype.zip (16.2 KB)

Hi @Krazay

Easiest way to do it is add this on scene load

var select = document.getElementById('country');
	
	country.addEventListener("change", function () {
		hypeDocument.functions().thisAlert();
	});

or add the function to the Head HTML that way you can call it from inside the <select> tag with an onchange

<script>
function thisAlert() {
    alert("YOUR MESSAGE");
}
</script>

then

<select onchange="thisAlert();">...
2 Likes

thank you…