Odd JavaScript getElementsByName undefined error -
okay, i've got missing or i'm crazy. here's code i'm having issue with, inside onchange event:
console.log( (this.parentnode.parentnode) ); // fine prints elements console.log( (this.parentnode.parentnode).getelementsbyname('otherposition[]') ); // gives me undefined error (this.parentnode.parentnode).getelementsbyname('otherposition[]')[0].style.opacity = '1'; // same error.
getelementsbyname
method of document
, elements doesn't have such method.
Comments
Post a Comment