Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #30358
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: Using getElementsByName on a DIV ? |
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
| References | <571e5590$0$5835$e4fe514c@news.xs4all.nl> <JpqLf9bYw+HXFw8E@invalid.uk.co.demon.merlyn.invalid> |
| Date | 2016-04-27 10:34 +0200 |
| Message-ID | <XnsA5F76BA273933eejj99@194.109.6.166> (permalink) |
Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> wrote on 27 Apr 2016 in comp.lang.javascript: > In comp.lang.javascript message <571e5590$0$5835$e4fe514c@news.xs4all.nl >>, Mon, 25 Apr 2016 19:37:21, R.Wieser <address@not.available> posted: > >>Now I think of it, I've got pretty-much the same question in regard to >>finding an "ancestor" element: I've written some code which moves up the >>DOM tree until it finds the sought for element, but maybe there is a >>simpler, single command available for that too. > > One should consider how often, and how quickly, this needs to be done. > > If it is only needed a few times, and the DOM tree is not vast, you > might as well just scan the whole DOM tree on every occasion until the > desired point is found. > > If it is to be done sufficiently frequently on an unchanging tree, it > seems to me likely that it would be worth-while to scan the whole DOM > tree initially, building a parallel tree or list or array containing > only the elements which might be wanted; and scan only that when an > element is wanted. You are absolutely right, John. However, perhaps 'we' sometimes forget that to the younger ones, programme-efficiency is not so much factual execution efficiency as imagined programming ease. The whole JQuery worship is based on such fallacy. -- 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
Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-25 19:37 +0200
Re: Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-25 20:57 +0200
Re: Using getElementsByName on a DIV ? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-04-25 20:10 +0100
Re: Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-25 21:42 +0200
Re: Using getElementsByName on a DIV ? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-04-25 23:07 +0100
Re: Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-26 09:32 +0200
Re: Using getElementsByName on a DIV ? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-04-26 11:28 +0100
Re: Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-26 14:52 +0200
Re: Using getElementsByName on a DIV ? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-04-26 14:40 +0100
Re: Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-26 18:37 +0200
Re: Using getElementsByName on a DIV ? "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-04-26 19:12 +0200
Re: Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-26 20:44 +0200
Re: Using getElementsByName on a DIV ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-26 19:17 +0200
Re: Using getElementsByName on a DIV ? Stefan Weiss <krewecherl@gmail.com> - 2016-04-26 19:56 +0200
Re: Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-26 22:11 +0200
Re: Using getElementsByName on a DIV ? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-04-26 19:40 +0100
Re: Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-26 21:43 +0200
Re: Using getElementsByName on a DIV ? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-04-27 00:14 +0100
Re: Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-27 11:05 +0200
Re: Using getElementsByName on a DIV ? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-04-28 01:10 +0100
Re: Using getElementsByName on a DIV ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-05-05 00:46 +0200
Re: Using getElementsByName on a DIV ? "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-05-06 12:56 +0200
Re: Using getElementsByName on a DIV ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-06 05:14 -0700
Re: Using getElementsByName on a DIV ? John Harris <niam@jghnorth.org.uk.invalid> - 2016-05-05 14:36 +0100
Re: Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-26 20:38 +0200
Re: Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-26 08:57 +0200
Re: Using getElementsByName on a DIV ? Stefan Weiss <krewecherl@gmail.com> - 2016-04-25 23:41 +0200
Re: Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-26 08:59 +0200
Re: Using getElementsByName on a DIV ? JJ <jj4public@vfemail.net> - 2016-04-26 19:03 +0700
Re: Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-26 14:56 +0200
Re: Using getElementsByName on a DIV ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-26 20:13 +0200
Re: Using getElementsByName on a DIV ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-26 20:19 +0200
Re: Using getElementsByName on a DIV ? Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-04-26 23:30 +0100
Re: Using getElementsByName on a DIV ? "R.Wieser" <address@not.available> - 2016-04-27 09:29 +0200
Re: Using getElementsByName on a DIV ? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-04-27 10:34 +0200
Re: Using getElementsByName on a DIV ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-04 19:04 -0700
csiph-web