There is a much better way to handle this then what is mentioned above
Code:
<input type="image" src="clear.gif" alt="Reset" onClick="this.form.reset(); return false;" /><input type="image" src="send.gif" alt="Submit" />
By using true
INPUT type=image objects for the images instead of regular
IMAGE objects we gain the power of using '
this', which removes the necessity of hard-coding the form's DOM name into the onClick() event. (
this.form references the form the input is located in) Remember, portable code = better code.
By simply adding 'return false();' to the onClick() event for the reset button, we cancel it's default action, which is to submit the form.