Hello all, I'm curious if anyone has experienced this frustrating problem; When I make forms, some of them the Enter key works to submit the form in IE 8 and on some of the forms it does not. Am I missing something??
Hello all, I'm curious if anyone has experienced this frustrating problem; When I make forms, some of them the Enter key works to submit the form in IE 8 and on some of the forms it does not. Am I missing something??
Last edited by crobinson42; 03-01-2012 at 05:02 PM.
Found this
All you need to do is add thisCode:<html> <head> <SCRIPT TYPE="text/javascript"> <!-- function submitenter(myfield,e) { var keycode; if (window.event) keycode = window.event.keyCode; else if (e) keycode = e.which; else return true; if (keycode == 13) { myfield.submit(); return false; } else return true; } //--> </SCRIPT> </head> <body> <FORM ACTION="processingpage" onKeyPress="return submitenter(this,event)"> <input type="text"></input> </FORM> </body> </html>onKeyPress="return submitenter(this,event)"to your form tag and this
to the head of your document. It'll submit the form onkeypress enter(keycode 13).Code:<SCRIPT TYPE="text/javascript"> <!-- function submitenter(myfield,e) { var keycode; if (window.event) keycode = window.event.keyCode; else if (e) keycode = e.which; else return true; if (keycode == 13) { myfield.submit(); return false; } else return true; } //--> </SCRIPT>
The srcipt was from here
Keyboard1333
crobinson42 (02-29-2012)
Thanks, I was hoping to not have to use script! I guess it's just a bug!?
Yes I agree, it can be very frustrating...
At least there's a fairly easy way out of it.
If this thread is finished please set it to Resolved. You can do this by clicking edit on your first post, go advanced, prefixes resolved.
Keyboard1333
Bookmarks