HighDots Forums  

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

Javascript JavaScript language (comp.lang.javascript)


Discuss Using document.load() to get html NOT xml document in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
icogs
 
Posts: n/a

Default Using document.load() to get html NOT xml document - 01-30-2008 , 11:02 PM






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
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.