doctor_james Posted October 31, 2007 Share Posted October 31, 2007 Hi guys . I have a form without a submit button but I dont want it to be submitted when "ENTER" is pressed . How can I do that ? It's submitted when I press enter ... thanks in advance . Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted October 31, 2007 Share Posted October 31, 2007 here is a example which should work fine for your needs <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> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.