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

Q932 Why can't I submit my form, it fails when using form.submit()?

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

You are trying to submit the form object, which contains all the forms in a document, and not the actual form.

Try:

<form name="myForm">
</form>

and then:

<script language="JavaScript"><!--
document.myForm.submit();
//--></script>

or:

<script language="JavaScript"><!--
document.form['myForm'].submit;
//--></script>

©2018 Martin Webb