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

Q593 How can I submit a form from a text link?

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

Try:

<script language="JavaScript"><!--
function func_name() {
    document.form_name.submit();
}
//--></script>

<form name="form_name">
<input type="text" name="input">
</form>

<a href="javascript:func_name()">submit</a>

If, however, you are using this to submit a form with an ACTION attribute with mail: then it will fail (quietly).

©2018 Martin Webb