I have a form and inside it there is a button.
<form>
<button type="button" onclick="hello(); return false;">Hi</button>
</form>
I'm trying to call hello
which is in my javascript file but I'm getting the error:
(index):43 Uncaught ReferenceError: hello is not defined at HTMLButtonElement.onclick ((index):43)
I'm using JSFiddle. My JavaScript is located in the JavaScript panel.
Why am I getting this error and how do I fix it (in JavaScript)?