Using document.load() to get html NOT xml document
- From: icogs <icogs@xxxxxxxxxxx>
- Date: Wed, 30 Jan 2008 20:02:01 -0800 (PST)
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.
.
- Prev by Date: Javascript countdown without refreshing.
- Next by Date: Stopping navigation away from the page
- Previous by thread: Javascript countdown without refreshing.
- Next by thread: Stopping navigation away from the page
- Index(es):
Relevant Pages
|