I want to grab a form object from an external javascript function instead of passing it from a submit button inside the tags.
So for example lets say my form is:
<form id="form1">
//inputs...
</form>
Normally I would just put a button in there with onClick="submitFunction(this.form)" to pass it to my javascript function, however now I'd like to be able to grab all that form data from an external function, but obviously "this.form" doesn't work outside the form tags.
There's probably a simple way to do this I am overlooking?
Thanks