getElementById not a function (greasemonkey)
Posted
by
Moose
on Stack Overflow
See other posts from Stack Overflow
or by Moose
Published on 2012-11-20T04:56:16Z
Indexed on
2012/11/20
4:59 UTC
Read the original article
Hit count: 261
I'm running GM_xmlhttpRequest and storing the responseText into a newly created HTML element:
var responseHTML = document.createElement('HTML');
onload: function() { responseHTML.innerHTML = response.responseText; }
And then I am trying to find an element in responseHTML.
console.log(responseHTML.getElementsByTagName('div'));
console.log(responseHTML.getElementById('result_0'));
The first works fine, but not the second. Any ideas?
© Stack Overflow or respective owner