I'm trying to run a function called "fn" with the onchange event, change the dropdown options. but this error to me (index): 190 Uncaught ReferenceError: fn () is not defined. Why is this happening?. I'm sure my function exists.
this is my code:
<div id="chart"></div>
<select id='dropdown' onchange="fn();">
<option value='1'>data1</option>
<option value='2'>data2</option>
<option value='3'>data3</option>
</select>
function fn(){
...