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

Discussion in 'Javascript' started by icogs, Jan 31, 2008.

  1. icogs

    icogs Guest

    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.
     
    icogs, Jan 31, 2008
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?S25vdEtub3JtYWw=?=

    get a word document using HTML H-E-L-P !!! :~(

    =?Utf-8?B?S25vdEtub3JtYWw=?=, Feb 21, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    472
    =?Utf-8?B?S25vdEtub3JtYWw=?=
    Feb 22, 2004
  2. Vimal
    Replies:
    0
    Views:
    603
    Vimal
    Oct 14, 2004
  3. Tony Prichard
    Replies:
    0
    Views:
    1,026
    Tony Prichard
    Dec 12, 2003
  4. Manish Hatwalne
    Replies:
    1
    Views:
    602
    Martin Honnen
    Jul 13, 2004
  5. Replies:
    0
    Views:
    286
  6. Replies:
    2
    Views:
    207
  7. SMH
    Replies:
    2
    Views:
    451
  8. Duke
    Replies:
    1
    Views:
    289
    Tom de Neef
    Apr 18, 2008
Loading...