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 . Link to comment https://forums.phpfreaks.com/topic/75523-form-submission/ 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> Link to comment https://forums.phpfreaks.com/topic/75523-form-submission/#findComment-382065 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.