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.
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.