Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #14602
| From | "Phil Hunt" <aaa@aaa.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: keycode |
| Date | 2012-06-21 13:00 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <jrvkel$b8t$1@speranza.aioe.org> (permalink) |
| References | <jrv9ht$d3e$1@speranza.aioe.org> <XnsA079A4362D14Ceejj99@194.109.133.133> <jrvbc0$i8k$1@speranza.aioe.org> <1598379.oMNUckLgyt@PointedEars.de> |
"basic DOM knowledge" and then "most difficult tasks in DOM programming"
???
Which one is it ? That's why I come here after google shows me so many dead
end.
I mostly pretend to do .net asp, but I just need this jscript this time
I google with 'event.keycode' to come up with
{
if(window.event) // IE8 and earlier
{
keynum = e.keyCode;
}
else if(e.which) // IE9/Firefox/Chrome/Opera/Safari
{
keynum = e.which;
}
It works, that's all I know
"Thomas 'PointedEars' Lahn" <PointedEars@web.de> wrote in message
news:1598379.oMNUckLgyt@PointedEars.de...
> Phil Hunt wrote:
>
>> I did google it.
>
> Using which keywords?
>
>> And I found 1 out of 1 million what works.
>
> Given that you had to search for this rather basic DOM knowledge, how can
> you be so sure now that it works, or be sure about the numbers? With how
> many keyboards in how many browser versions on how many OSes on how many
> platforms have you tested this supposed solution?
>
> Because of the differences in DOM implementations, handling keyboard
> events
> properly ranges among the most difficult tasks in DOM programming. See
> for
> example
>
> <http://unixpapa.com/js/key.html>
> <http://brain4.de/programmierecke/js/tastatur.php#start>
>
> And it is considered good style to present the solution that one has found
> by oneself to the community to make up for the free time of others, and
> for
> others to learn from it. It is also considered good style on Usenet to
> not
> top-post.
>
> <http://jibbering.com/faq/#posting>
>
>
> PointedEars
> --
> Sometimes, what you learn is wrong. If those wrong ideas are close to the
> root of the knowledge tree you build on a particular subject, pruning the
> bad branches can sometimes cause the whole tree to collapse.
> -- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom@94.75.214.39>
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
keycode "Phil Hunt" <aaa@aaa.com> - 2012-06-21 09:54 -0400
Re: keycode "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-06-21 14:08 +0000
Re: keycode "Phil Hunt" <aaa@aaa.com> - 2012-06-21 10:25 -0400
Re: keycode "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-06-21 14:50 +0000
Re: keycode "Phil Hunt" <aaa@aaa.com> - 2012-06-21 11:00 -0400
Re: keycode "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-06-21 16:30 +0000
Re: keycode Arno Welzel <usenet@arnowelzel.de> - 2012-06-27 17:31 +0200
Re: keycode Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-06-21 18:28 +0200
Re: keycode "Phil Hunt" <aaa@aaa.com> - 2012-06-21 13:00 -0400
Re: keycode Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-06-21 20:08 +0200
csiph-web