Forum Moderators: open

Message Too Old, No Replies

jQuery submit form on enter.

         

cdmn

2:11 pm on Jul 23, 2009 (gmt 0)

10+ Year Member



Hi all,

i have a bit of headache.

I have a form whitout any type="submit" button.
Instead i have bind form.submit() event on every <input type="text" /> <enter> press, to simulate normal form behavior.

Problem occurs when user tries to enter some value and firefox (or other browser) gives standart autocomplete suggestion, user picks one of the suggestions by pressing <enter> and form gets submitted.

Maybe someone knows some sort of work-a-round?

Thanks in advance!

cdmn

5:26 am on Jul 24, 2009 (gmt 0)

10+ Year Member



Anyone?

Mike521

6:25 pm on Jul 24, 2009 (gmt 0)

10+ Year Member



maybe put validation on all the fields so if anything is blank it won't submit? It will give them validation messages just for using their autocomplete, which would be annoying, but maybe that's better than submitting the form with blank fields