Howto access xmlHttp.responseText as document.getElementByTagName ?
If I access a .html page through the xmlHttp, how can I use the functions .getElementsByTagName and .getElementById on the data found in the xmlHttp.responseText?
(the .responseXML returns null, and the responseText is simple text, of course containing valid html code)
What I'm reading:
You want to download an html page via xmlHttp, the elements inside that that downloaded html page you want to access via document.getElementByID
right?
This is not doable, per say, since you don't download htmlpages with htmlHttp but you download data, either in string or xml.
What i think acoder means is:
you make an empty div tag.
you download your htmlpage and retrieve it with the responseText property.
you then set your div tag's innerHTML=responseText
now, for browser compability reasons i suggest you use an iframe instead of a div tag :) for example, if your html page is valid xhtml you will have header and such defined, that could make browsers confused... this won't happen in an iframe ;)