Ajax AutoComplete Support Product Page

This topic was archived

Using Enter Key With Autocomplete Forces A Form Submit Prematurely

Reported 18 Sep 2009 21:11:05
1
has this problem
18 Sep 2009 21:11:05 billy flynt posted:
We have the extension doing it's job, and when the user makes a selection with the mouse, all is good.

However, when the user makes an autocomplete selection with the Enter Key (13), the Form is being prematurely submitted, and the user is unable to continue filling out the form.

Please advise.

Replies

Replied 18 Sep 2009 23:01:40
18 Sep 2009 23:01:40 Patrick Julicher replied:
Hi Billy,

I think this is inherent to using the Enter key in forms. You might want to activate some form of validation to the form, so that the form does not get submitted until all the mandatory fields have been filled.

Kind regards, Patrick
Replied 21 Sep 2009 18:38:05
21 Sep 2009 18:38:05 billy flynt replied:
Patrick,

I agree, we placed an *onkeypress* function on the autocomplete field to filter out the enter key.

This allows these web-agnostic users to make a selection from the dropdown without submitting the form.

Thanks for your support.
Replied 21 Sep 2009 19:44:40
21 Sep 2009 19:44:40 Patrick Julicher replied:
Hi Billy,

Nice solution. Could you post or e-mail me the code you came up with, so we might write an FAQ on this? This might be helpful to more users!

Kind regards, Patrick

Reply to this topic