View Full Version : input type=image [!submit the form, NN4]

08-24-2002, 03:10 AM

I've read through some previous posts, but couldn't find a solution to using a "reset" button with type=image that will work in NN4 without submitting the form. I've already tried return false, reset(), and some others, which do work in IE, but I haven't been able to come up with a custom function that will prevent NN4 from submitting the form.

Does anyone know of a workaround for this?

Thanks for any assistance.

He is risen!!!

08-24-2002, 06:20 AM
A type of image is for submitting forms only. You should not use it for anything else. You could use a normal link and img tag to do the reset like this:
<A HREF="javascript:document.form_name.reset()"><IMG SRC="sub.gif" NAME="subimg" BORDER="0"></A>


<A HREF="javascript:void" onClick="document.form_name.reset()"><IMG SRC="sub.gif" NAME="subimg" BORDER="0"></A>

08-24-2002, 07:09 AM
Thanks, Jyoung. Here is what I used:

<a href="javascript:void(0);" onClick="document.myForm.reset();return false;"><img src="clearForm.gif" border="0"></a>

Works a treat. Thanks, again. I appreciate it.

He is risen!!!