Using document.load() to get html NOT xml document

I

icogs

I wish to load an html document which may or may not be xhtml. I then
wish to retrieve some elements using getElementsByTagName(). If I load
the document into an <iframe> this works fine, however if I use
document.load() then, even though the document is successfully
retrieved, getElementsByTagName() returns nothing (yes I am using the
correct case for the tag name). I suspect this is because it is being
loaded as an xml document and, being html, this document will not be
well formed. Is there a way to load as a regular html document? I
would rather not use a hidden <iframe> if possible as I don't want to
load embedded images etc.

I am doing this from within a .xul document with Firefox BTW.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top