Undefined is not an object . Why??
Because it is undefined, your code listElNodes[i] is not referencing an object in JavaScript, probably as a result of another problem.