You are here: irt.org | FAQ | HTML | Q2066 [ previous next ]
This can be achieved by submitting the form using the onClick event handler instead of onSubmit event handler. It is necessary to return false on event handler onSubmit to prevent submit on hitting ENTER key. Sample code:
<form name="form1" onSubmit="return false"> <input type="text"> <input type="button" value="SubmitForm" onClick="document.form1.submit()"> <a href="#" onClick="document.form1.submit()"><img src="button.gif"></a> </form>