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

Q211 Why when using a form input type of "image" is the onClick event handler ignored in Netscape?

You are here: irt.org | FAQ | JavaScript | Image | Q211 [ previous next ]

According to the Netscape JavaScript Reference manual there isn't a form input type of image. Therefore there can't be any event handlers for a non existent input type.

You could replace your non existent image input type with a proper image tag wrapped up in a proper link tag:

<form name="formname">
<a href="javascript:myfunction()"><img src="picture.gif" width="16" height="16" border="0"></a>
</form>

Now you can either use the myfunction() function to submit the form using document.formname.submit() - which will fail if the action of the form is mailto:, or you can use the myfunction() function to perform form validation first and then submit the form. The document.formname.submit() does not in itself invoke the forms onSubmit event handler.

Feedback on 'Q211 Why when using a form input type of "image" is the onClick event handler ignored in Netscape?'

©2018 Martin Webb