“getElementById not a function” when trying to parse an AJAX response?

Use DOMParser() to convert responseText into a searchable DOM tree. Also, your attempts to search/use anything derived from responseText, must occur inside the onload function. Use code like this: GM_xmlhttpRequest ( { … onload: parseAJAX_ResponseHTML, … } ); function parseAJAX_ResponseHTML (respObject) { var parser = new DOMParser (); var responseDoc = parser.parseFromString (respObject.responseText, “text/html”); console.log … Read more