Trap the enter key, but not when choosing the browser's autocomplete suggestion
I have some textboxes on a page and I want to click a link when the user presses enter in any of them. I can easily trap the enter button using javascript (by looking for 13 in event.keyCode and event.which ), but I hit an issue when the browser's autocomplete feature kicks in and suggests what the user might want to type. We're finding the users often press enter to accept the browser's suggestion, rather than tab. This confuses the users as the link is clicked immediately, whereas they still intended to enter text into some of the other fields. I know it would be better to use a form and a