Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Using document.load() to get html NOT xml document

Reply
Thread Tools

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

 
 
icogs
Guest
Posts: n/a
 
      01-31-2008
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Building SVG document Using DOM Interface Inside HTML Document SMH Javascript 2 03-18-2007 08:57 AM
translate a HTML document into a XHTML document mike Java 3 01-24-2005 09:42 AM
A HTML document can be converted to XHTML document. mike Java 2 01-14-2005 06:00 AM
Refer to an XML document from within an XML document Manish Hatwalne XML 1 07-13-2004 10:24 AM
Help on including one XML document within another XML document using XML Schemas Tony Prichard XML 0 12-12-2003 03:18 PM



Advertisments