Ok I feel like this should be really simple; so either I've completely missed the point of the questions on here and other websites I've read or it hasn't been asked in the same context....
I have a REALLY simple form element (below)
<form>
<input type="text" id="searchTerm" />
<input type="submit" value="Submit" id="submitButton" />
</form>
And essentially all I want to do, when the Submit
button is clicked, is have the value entered into the text
box passed to a JavaScript Function
and console logged (for now).
This looks like it has been asked a million times but the questions I've read don't answer my question (I don't think).
Edit Thank you for all the responses; the biggest problem is I was trying to reference a function in an external Javascript
file that was being called after the form element.