Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Form 7.3 | Q593 [ previous next ]

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

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).

Feedback on 'Q593 How can I submit a form from a text link?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.