Hello Richard and all, For some reason it doesn't work (IE8). Might it be due to the validation plugin? Thanks!
-- With best regards from Ukraine, Andre Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule ----- Original message ----- From: Richard D. Worth <rdwo...@gmail.com> To: jquery-en@googlegroups.com <jquery-en@googlegroups.com> Date: Saturday, December 19, 2009, 11:27:39 PM Subject: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page? Is it, thanks to normalization done by jQuery, as Mike mentioned. - Richard On Sat, Dec 19, 2009 at 4:18 PM, Andre Polykanine <an...@oire.org> wrote: > Hello Richard and all, > > Is that a multi-browser solution? > Thanks a lot! > > -- > With best regards from Ukraine, > Andre > Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ > jabber.org > Yahoo! messenger: andre.polykanine; ICQ: 191749952 > Twitter: m_elensule > > ----- Original message ----- > From: Richard D. Worth <rdwo...@gmail.com> > To: jquery-en@googlegroups.com <jquery-en@googlegroups.com> > Date: Friday, December 18, 2009, 3:19:55 AM > Subject: [jQuery] Re: What is the event when a user presses the enter key > anywhere on the page? > > $(document).keypress(function(e) { > if(e.ctrlKey && e.which == 13) { > $('#myForm').submit(); > } > }); > > or > > $('#myForm').keypress(function(e) { > if(e.ctrlKey && e.which == 13) { > $(this).submit(); > } > }); > > - Richard > > On Thu, Dec 17, 2009 at 7:40 PM, Andre Polykanine <an...@oire.org> wrote: > > > Hello Mike and all, > > > > Sorry, I also have a question about keypresses. > > I need a form to be submitted by pressing Ctrl+Enter. How do I manage > > to do that? > > Thanks! > > > > -- > > With best regards from Ukraine, > > Andre > > Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ > > jabber.org > > Yahoo! messenger: andre.polykanine; ICQ: 191749952 > > Twitter: m_elensule > > > > ----- Original message ----- > > From: Mean Mike <mcgra...@gmail.com> > > To: jQuery (English) <jquery-en@googlegroups.com> > > Date: Thursday, December 17, 2009, 9:06:36 PM > > Subject: [jQuery] Re: What is the event when a user presses the enter key > > anywhere on the page? > > > > keypress > > > > $(document).keypress(function(e) { > > if ((e.which && e.which == 13) || > > (e.keyCode &&e.keyCode == 13)) > > { > > // do something > > } > > }); > > mean mike > > On Dec 17, 2:03 pm, "laredotorn...@zipmail.com" > > <laredotorn...@zipmail.com> wrote: > > > Hi, > > > > > > I would like to capture the event of pressing enter anywhere on the > > > page, even if the focus of the mouse cursor is not on a text field. > > > What event/element am I looking at? > > > > > > Thanks, - Dave > > > > > >