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 19:40:31 +0100 Organization: A noiseless patient Spider Lines: 51 Message-ID: <87shy86wo0.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> <87d1pc8xzs.fsf@bsb.me.uk> <571f6433$0$5816$e4fe514c@news.xs4all.nl> <877ffk8p59.fsf@bsb.me.uk> <571f9907$0$5862$e4fe514c@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="8948"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ixS4piww2w2t1KrXIXh460pgDUgmFfr0=" Cancel-Lock: sha1:CMI2oE6h9xdb5G6tEqThlujJRsA= sha1:fVGfbn2jKscZtR/NELGsZjCF53M= X-BSB-Auth: 1.c0595443a27182f9bb8e.20160426194031BST.87shy86wo0.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:30348 "R.Wieser" writes: >> But you need to say enough that people know how to offer help. > > As far as I can tell I have given you all requirements as well as all the > arguments and the result data. I've posted the error message when I was > asked for it, and even offered results of a few tests I did myself. What > more do you want/need ? You want to get a img from a div (and sometimes you say "find a descendent of a certain element" which is even more vague). Given that specification I know you have the right method to call (though with the more vague one, the firstChild property might be enough), but something is not right because you want to "figure out why I can't get it to work". >> Yes, I'd like to figure that out too but I have no data to go on. > > Than *ask* for such data. I'm no mindreader you know. Tell me which test > results you need and I will try to get them for you. I did: an example document with the code that does not work. >> But it's unlikely that what you want is so general that one of >> the built-in methods will do the job > > Than why the heck have we been talking about the "getElementsBy*" functions > ? Those seem to do exactly what I'm looking for. > > The only question now is, why won't they work for me ? Have I made a > mistake somewhere ? Anything else ? Yes, you've make a mistake somewhere. If you'd like some help to find out where, given an example document, state the element you'd like to find and show the code that doesn't work. > tl;dr: > If you do not help me to figure out what you need than I can't give you what > you need to help me. You even quoted me asking: >> ... If >> you posted an example document with the code that does work, it would >> help a lot. -- Ben.