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: Mon, 25 Apr 2016 23:07:47 +0100 Organization: A noiseless patient Spider Lines: 20 Message-ID: <87zish8hqk.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="1884"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xQCz59Yxk8YvyH/hccwMiwbMZwD9olEU=" Cancel-Lock: sha1:heD7cMBuHwKh73esWZZsfu3dPXo= sha1:XzahOC5Hvhb3R0PuQ1w+32ln/RQ= X-BSB-Auth: 1.6224ca754d89692f48d9.20160425230747BST.87zish8hqk.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:30321 "R.Wieser" writes: >> If it did not work, it's not for being the new boy in town. > > Thats what I thought too, but that document made me doubt it ... > >> Can you say more than just that it didn't work for you? > > Well. The FF Javascript Console told me that "Ancestor.getElementsByName > is not a function" (the "Ancestor" variable contains a "parentNode" > result). Stefan has explained the basic issue (using getElementsByName instead of getElementsByTagName) but you might be curious at to why you get this error. getElementsByName is not a method of elements but only of documents. -- Ben.