Javascript Get child by name
I am passing var el
to a function. el
contains the previously captured element (using getElementById), and when I console.log el
in a function, I get this:
The problem comes when I try to grab an element internally el
using:
el.getElementsByName('fname');
I am getting the error:
Uncaught TypeError: Object #<HTMLDivElement> has no method 'getElementsByName'
+3
source to share