accessing content of an <IFRAME>

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Richie

    accessing content of an <IFRAME>

    I have a situation where I'd like to read/parse the content
    of a file I've read into an <IFRAME>. I've looked through
    various FAQs and searched forums, and the closest I get to
    accessing the file content is

    myIframe.conten tWindow.documen t.body.innerHTM L

    where myIframe is the node from getElementById( ). But while
    I can see the content of the file on my web page, I get an
    empty string from the above reference. How do I get to the
    file?

    Thanks for any help.
  • Randy Webb

    #2
    Re: accessing content of an &lt;IFRAME&g t;

    Richie wrote:
    [color=blue]
    > I have a situation where I'd like to read/parse the content
    > of a file I've read into an <IFRAME>. I've looked through
    > various FAQs and searched forums, and the closest I get to
    > accessing the file content is
    >
    > myIframe.conten tWindow.documen t.body.innerHTM L
    >
    > where myIframe is the node from getElementById( ). But while
    > I can see the content of the file on my web page, I get an
    > empty string from the above reference. How do I get to the
    > file?
    >
    > Thanks for any help.[/color]

    if myIframe is the IFrame itself, you only need
    myIframe.docume nt.body.innerHT ML.

    But that won't give you the *entire* document, and it also "normalizes " it.

    If the document is in the same domain, you can even look into the
    HTTPRequestObje ct <URL: http://jibbering.com/faq/#FAQ4_38>

    Good luck with it.

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    • Robert

      #3
      Re: accessing content of an &lt;IFRAME&g t;

      In article <IewZc.101180$F g5.53725@attbi_ s53>,
      Richie <spam_me_not@co mcast.net> wrote:
      [color=blue]
      > I have a situation where I'd like to read/parse the content
      > of a file I've read into an <IFRAME>.[/color]

      This post I did earlier might help.

      See:
      reading items in a host directory


      um=1

      Robert

      Comment

      Working...