Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1803 Why won't the form submit() method work?

You are here: irt.org | FAQ | JavaScript | Form | 7.3 | Q1803 [ previous next ]

The submit method fails if there is a submit button named submit, for example

this does not work:
<a href="javascript:document.forms.testForm.submit()">submit Form</a>
<form name=testForm>
<input type=submit name=submit>
</form>

this works:
<a href="javascript:document.forms.testForm.submit()">submit Form</a>
<form name=testForm>
<input type=submit name=submitButton>
</form>

Submitted by dlb@gmx.ch

©2018 Martin Webb