Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Using getElementsByName on a DIV ? Date: Tue, 26 Apr 2016 11:28:55 +0100 Organization: A noiseless patient Spider Lines: 26 Message-ID: <87d1pc8xzs.fsf@bsb.me.uk> References: <571e5590$0$5835$e4fe514c@news.xs4all.nl> <571e6847$0$5912$e4fe514c@news.xs4all.nl> <8760v5a4ic.fsf@bsb.me.uk> <571e72f0$0$5941$e4fe514c@news.xs4all.nl> <87zish8hqk.fsf@bsb.me.uk> <571f1936$1$5824$e4fe514c@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="24274"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18J9WylTDWygLb57r6dbQ1QDp8NF3gesvQ=" Cancel-Lock: sha1:7cstdLPQPIoWhBStTR3dg4paFdk= sha1:cGSKJJPlyMQV60m1xRmYgPsem0U= X-BSB-Auth: 1.bc72a3ee1fae1933b67d.20160426112855BST.87d1pc8xzs.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:30332 "R.Wieser" writes: >> getElementsByName is not a method of elements but >> only of documents. > > Yes, thats what I concluded too (but as a novice in this regard wanted > to verify it), and why I asked if there was another command that would > indeed work for elements. > > Hmmm ... It looks that the only "document.getElementsBy*" command that > wishes to work *at all* on the browser I'm using for testing is the > "TagName" one ... Bummer. Well you should also have getElementsByTagNameNS but that's a technicality. However, you might still be confusing document methods with element methods since you originally asked about looking inside a div (which will be modelled as an element) and here you are taking about document.getElementsBy* methods. There does not seem to be anything odd about what you are trying to do, so I'm a bit lost as to why you can't find what you need. What is the high-level task you are trying to achieve? -- Ben.