Saturday, December 19, 2009

Re: Re[2]: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page?




From: Richard D. Worth <rdworth@gmail.com>
To: jquery-en@googlegroups.com
Sent: Sunday, December 20, 2009 0:27:39
Subject: Re: Re[2]: [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 <andre@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 <rdworth@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 <andre@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 <mcgrailm@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
>
>




New Email names for you!
Get the Email name you've always wanted on the new @ymail and @rocketmail.
Hurry before someone else does!

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate