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


Groups > comp.lang.javascript > #32150

Re: onkeyup in Firefox (was: onkeyup not working for me in FireFox 50.1.0)

Newsgroups comp.lang.javascript
Subject Re: onkeyup in Firefox (was: onkeyup not working for me in FireFox 50.1.0)
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References <edfu3kFkfvbU1@mid.individual.net> <7279249.NyiUUSuA9g@PointedEars.de> <edgj5vFp050U1@mid.individual.net>
Date 2017-01-09 09:44 +0100
Message-ID <XnsA6F8632E65743eejj99@194.109.6.166> (permalink)

Show all headers | View raw


"Mel Smith" <syntel@cox.net> wrote on 09 Jan 2017 in comp.lang.javascript:

> function chkforret(el) {

Where do you use this el ????

> // alert("in chkforret() now") ;

> var e = event ;
> if (e===null) e = window.event ;

Use instead:

var e = event || window.event ;

BUT perhaps you ment:

function chkforret(el) {
  el = el || window.event;
  ...

====

> if (e.keyCode=="13") {
>    gotret = true ;
>    return false ;
>    }
> gotret = false ;
> return true ;
>}

Use instead:

return ! (gotret = e.keyCode == 13);


Did you var gotret globally??
Do you use the return value?

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next 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