I have a form and I applied the onsubmit function:
var theForm = document.getElementById("myform");
theForm.onsubmit = function FormSubmit() {
alert("something");
};
I added a submit button to my form <input type="submit" value="submit"/>
Text is being somethingwarned. Fine!
I have an image and I want to send it to the form:
<img onclick="document.getElementById('myform').submit();" src="mylocation"/>
But this does not make the function ... it does not warn somethingon the screen.
EDIT: I don't want something with jQuery. Pure js
MM PP source
share