Form submit by enter key and Internet Explorer
Related: Submit Form when no submit button is present in IE
Ran into an (other) interesting Internet Explorer bug. Seems that if you have a form with only a single text input, hitting the enter button will not submit the form in IE.
The solution is to hide an additional disabled input for IE to find, using IE conditional Comments and hiding it from view with some CSS.
Now the form will submit in IE when you hit the enter key!
n.banerjee
Hey thanks….It works!!
R.N
Thanks, man. You saved my job, it really works. Just another one of those wacky Microsoft bugs…
surya
Wow..Excellent…
Nghaka
IE bugs. Major time wasting useless good4nothing…i could go all day. anyway, good job.
Thomas Han
Just another hack to get pass the problem.
The solution is not to add another hidden field.
What you really need is to attach a default action on the form on submit!
Jim Mayes
please, elaborate
mary
Yes Thomas Han, please elaborate, you might have an alternative solution.
Yie
First of all, THANKS for the solutions! I have been searching it and testing and finally only yours is working!
HOWEVER…other Login pages (with different passwords and links) have logged in without entering the password. How could that happened? The only thing I added on that one page is:
Which means I haven’t changed on other Login pages.
Any idea? THANKS A LOT!
Ersin Okkaya
you are the man! Thanks a lot!
ROck
Hey ! Thanks a lot it works and helped me …..
Chris B. Behrens
This post is still delivering value two and a half years later…thanks.
Caner Turhan Alp
Thank you very much, works great! ;)
Jens
Great! Thanks
kashif aziz
great — IE = headache for developers :(
Dan
Works perfectly, thanks!
Bill
This funny MS bug cost me a day to find solution… until I see this page.
Excellent, Thanks!
Matt Smith, modMACRO
I wish there was a cleaner way, but haven’t found it yet. It works, and I can’t argue with results. Thanks for posting!
Pressing enter with in text box, submit button set, unset issue with IE | PHP Developer Resource
[...] Thanks @Yaniro. It is a IE bug. [...]
rosdi
What do you know… it works!!.. I am using IE8 and it is still exhibiting this bugs.
Thanks a bunch!