Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Mel Smith" Newsgroups: comp.lang.javascript Subject: Re: onkeyup in Firefox (was: onkeyup not working for me in FireFox 50.1.0) Date: Mon, 9 Jan 2017 10:26:20 -0700 Lines: 78 Message-ID: References: <7279249.NyiUUSuA9g@PointedEars.de> X-Trace: individual.net /GL44vDvG91MX5rg5jTQeQqfo+H4JJOVmK9QwSRyquhSwhJpSv Cancel-Lock: sha1:zCPamUavaVE8RUHeBWQgCoUBylY= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: csiph.com comp.lang.javascript:32151 Evertjan said: >> function chkforret(el) { > > Where do you use this el ???? I did use 'el' in several previous iterations of testing, but do not do so now, and forgot to remove it. (Will do so today) Also, checked out Safari Version 5.1.7 (7534.57.2) on my dev PC today, and it works 'correctly'. So that leaves FF as 'odd-man-out' for now. (I haven't got Opera on my system because it is not frequently used in North America, and even less frequently among my 613 potential clients.) > >> // alert("in chkforret() now") ; > >> var e = event ; >> if (e===null) e = window.event ; > > Use instead: > > var e = event || window.event ; > Yes, will change this. Thanks ! > 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); > O.K., will use this too. (but should I not use ""13"" instead ? > > Did you var gotret globally?? YES > Do you use the return value? > I use the value of 'gotret' when returning to the 'onkeyup' clause to 'blur'. Then, the onblur clause operates. btw, thru my server software I read html templates, build, and send pages to clients, access and manipulate databases. I use the Harbour language for this (a Hi-C type of language). www.whosaway.com Next, I will be scratching my head and trying to re-learn AJAX. Used it a few years ago successfully. Since then, I've lost a lot of what I knew, and what I knew was then incomplete, wrong and now certainly out-of-date. I am still bothered that 'onkeyup' is invisible to FF, whereas the three others I tested work for me as Iexpected. Thanks for all the constructive suggestions above ! Will ensure they are implemented as you detailed. -Mel Smith