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

Q176 How can I submit a form using a normal image link?

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

<FORM NAME="myform">
<A HREF="javascript:document.myform.submit()"><IMG SRC="text1.gif" WIDTH="16" HEIGHT="16" BORDER="0"></A>
</FORM>

However, when using this method the forms onSubmit() event handler is not invoked. Although you can invoke by changing your code to call it directly before submitting the form.

Feedback on 'Q176 How can I submit a form using a normal image link?'

©2013 Martin Webb

ArticlesFAQsGamesFeedback

FOLDOCRFCsInstant JavaScriptSoftwareBooksJavaScript Programmer's ReferenceAboutTop