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... 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? 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> 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! 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
Archived
This topic is now archived and is closed to further replies.