antonyjohn Posted September 11, 2007 Share Posted September 11, 2007 hai friends... there is a problem in one of my forms...this form has got only one text field and a submit button... without using the submit button .i need to submit the data entered in the text field to be inserted into the data base,with directly by pressing the enter key.... plzzzzzzz help... Quote Link to comment https://forums.phpfreaks.com/topic/68818-problem-with-enter-key-submit/ Share on other sites More sharing options...
bonaparte Posted September 11, 2007 Share Posted September 11, 2007 This problem seems to be specific to browsers. Have you tried to submit the form by pressing the enter key in different browsers? Quote Link to comment https://forums.phpfreaks.com/topic/68818-problem-with-enter-key-submit/#findComment-345872 Share on other sites More sharing options...
jitesh Posted September 11, 2007 Share Posted September 11, 2007 <script language="javascript"> function submitform(frmObj,pressedascii){ if(pressedascii == 13){ frmObj.submit(); } } </script> <form name="frmname" action="test1.php" method="post"> <input type="text" name="name" value="" onkeypress="javascript:submitform(this.form,event.Keycode);" </form> Quote Link to comment https://forums.phpfreaks.com/topic/68818-problem-with-enter-key-submit/#findComment-345875 Share on other sites More sharing options...
MadTechie Posted September 11, 2007 Share Posted September 11, 2007 please move this to the JS section, its not a PHP problem! Quote Link to comment https://forums.phpfreaks.com/topic/68818-problem-with-enter-key-submit/#findComment-345879 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.