R.Wieser
4/25/2016 5:37:00 PM
Hello all,
I need to find an IMG element in a DIV. I have written some code to do
just that, but suddenly thought of using getElementsByName on the DIV node.
Alas, that does not seem to work.
#1: can I use getElementsBy* to find sub-elements of a DIV (or other
grouping element) at all ?
#2: if the answer to #1 is "no", is there another command that will do it ?
A google search did not turn up anything in that regard.
Mind you, I've already written a solution. I'm just wondering if my
multi-line recursive function could be replaced by a simpler, single
command.
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.
Regards,
Rudy Wieser