Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #18675
| From | Cezary Tomczyk <cezary.tomczyk@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Setting focus |
| Date | 2013-03-01 08:18 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <kgpko7$iq0$1@speranza.aioe.org> (permalink) |
| References | (1 earlier) <2471865.AAA9jsC1C5@PointedEars.de> <2fhvi8djf47mg171ogdejn3akiam4s10ds@4ax.com> <2754930.5lBmWyc64D@PointedEars.de> <kgokv7$du5$1@speranza.aioe.org> <XnsA175F03EDDEB5eejj99@194.109.133.133> |
W dniu 2013-02-28 23:37, Evertjan. pisze:
> Cezary Tomczyk wrote on 28 feb 2013 in comp.lang.javascript:
>
>> W dniu 2013-02-28 22:17, Thomas 'PointedEars' Lahn pisze:
>> [...]
>>> var t = window.setTimeout(function () {
>>> field.focus();
>>> window.clearTimeout(t);
>>> field = null;
>>> t = null;
>>> }, 50);
>>
>> Why here is window.clearTimeout(t);?
>
> Not needed, the timeout is cleared on firing.
>
> There is no need te set the field variable to null.
>
> There is no need te set the t variable to null.
>
> There is no need to name the setTimeout(),
> if you don't want to prevent firing it,
> so the variable t is not needed at all.
Exactly I think in the same way. That's why I asked.
--
Cezary Tomczyk
http://www.ctomczyk.pl/
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Setting focus Tim Slattery <Slattery_T@bls.gov> - 2013-02-28 14:30 -0500
Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-28 20:50 +0100
Re: Setting focus Tim Slattery <Slattery_T@bls.gov> - 2013-02-28 16:05 -0500
Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-28 22:17 +0100
Re: Setting focus Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-02-28 23:16 +0100
Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-28 23:36 +0100
Re: Setting focus Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-03-01 08:21 +0100
Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-01 13:10 +0100
Re: Setting focus "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-02-28 23:37 +0100
Re: Setting focus Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-03-01 08:18 +0100
Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-01 13:12 +0100
Re: Setting focus Bernd Nawothnig <Bernd.Nawothnig@t-online.de> - 2013-03-02 15:16 +0100
Re: Setting focus Scott Sauyet <scott.sauyet@gmail.com> - 2013-03-21 20:06 -0700
Re: Setting focus Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-03-22 10:03 +0100
Re: Setting focus Tim Slattery <Slattery_T@bls.gov> - 2013-03-22 08:53 -0400
Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-23 15:09 +0100
Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-23 15:07 +0100
Re: Setting focus Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-03-24 12:38 +0100
Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-24 13:42 +0100
Re: Setting focus Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-03-24 13:54 +0100
Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-23 15:04 +0100
Re: Setting focus Scott Sauyet <scott.sauyet@gmail.com> - 2013-03-23 17:35 -0700
Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-24 10:41 +0100
Re: Setting focus Scott Sauyet <scott.sauyet@gmail.com> - 2013-03-24 16:42 -0700
Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-30 14:27 +0100
Re: Setting focus Scott Sauyet <scott.sauyet@gmail.com> - 2013-03-30 09:25 -0700
Re: Setting focus Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-30 19:50 +0100
Re: Setting focus Scott Sauyet <scott.sauyet@gmail.com> - 2013-03-30 17:11 -0700
Re: Setting focus Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-03-30 01:02 +0100
Re: Setting focus Scott Sauyet <scott.sauyet@gmail.com> - 2013-03-30 09:17 -0700
Re: Setting focus "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-03-30 17:55 +0100
csiph-web