Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #32152

Re: onkeyup in Firefox

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: onkeyup in Firefox
Date 2017-01-09 19:09 +0100
Organization PointedEars Software (PES)
Message-ID <2131200.jE0xQCEvom@PointedEars.de> (permalink)
References <edfu3kFkfvbU1@mid.individual.net> <7279249.NyiUUSuA9g@PointedEars.de> <edgj5vFp050U1@mid.individual.net>

Show all headers | View raw


Mel Smith wrote:

> Also, I did quite a bit of google searching. Many others complained of
> "onkeyup" not executing a specific function with Firefox

And you do not even remember what the "function" was, right?  But "many 
others" said Firefox was the problem, therefore you just believed it.
Cargo cult programming.

Probably it was a this.focus() _method_ call (or equivalent), and probably 
those people were attempting to force the user to type something in that 
field because it was "required".  Such script-kiddie approaches to Web 
development are averted by the Firefox/Gecko UX people.  AISB.
 
> Anyway, my text field of has a max length of 3 chars and will (later) be
> followed by several other fields. I wish each of this to be 'blurred' when
> a user tabs or <return>s.

That is why, AISB, you should handle the “keyup” event at a common ancestor 
element instead.
 
> Another also: my logical vrbl 'gotret' is global and is set to false on
> entry to the validate() function. If a <return> is sensed, it is set to
> true.

One of the first rules of thumb in programming is to avoid global variables.
 
> I only want chkforret() set the 'gotret' vrbl -- nothing further.

Usenet is not what you want.  And I, for one, am not someone who will help 
you eating your soup with a knife, so that you will eventually cut your 
tongue in the process, because a knife is the only tool that you presently 
know; I am someone who introduces the spoon to you instead.  Which I did.
 
-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

onkeyup not working for me in FireFox 50.1.0 "Mel Smith" <syntel@cox.net> - 2017-01-08 15:51 -0700
  onkeyup in Firefox (was: onkeyup not working for me in FireFox 50.1.0) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-01-09 00:30 +0100
    Re: onkeyup in Firefox (was: onkeyup not working for me in FireFox 50.1.0) "Mel Smith" <syntel@cox.net> - 2017-01-08 21:51 -0700
      Re: onkeyup in Firefox (was: onkeyup not working for me in FireFox 50.1.0) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-01-09 09:44 +0100
        Re: onkeyup in Firefox (was: onkeyup not working for me in FireFox 50.1.0) "Mel Smith" <syntel@cox.net> - 2017-01-09 10:26 -0700
          Re: onkeyup in Firefox (was: onkeyup not working for me in FireFox 50.1.0) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-01-09 19:19 +0100
      Re: onkeyup in Firefox Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-01-09 19:09 +0100

csiph-web