To use the form submit javascript function you need to know the name of the form.
document.forms["myform"].submit();
or
document.myform.submit();
to submit
<form name="myform">...</form>
In my case i have a completely random name as form name. What I do know is that there is always only one form element present at the page. Any ideas to submit the form using javascript?
<form name="145f88f84584594">...</form>
document.forms holds all forms.
This should work: document.forms[0].submit();.
document.getElementsByTagName("form")[0].submit();
or if you're using jQuery:
$("form:first").submit();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With