get the html source code from iframe

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

    #1

    get the html source code from iframe

    Dear sir,

    I am writting an WYSIWYG html editor, I need to get the html source code out
    of an iframe. I know I can use innerhtml or innertext. But that will remvoe
    the html header info which is what I need. html header may contains
    reference to base url or style sheet information.

    How can I get the full source code out of an iframe???

    --
    Kind regards

    Guoqi Zheng
    guoqi AT meetholland dot com




  • Randy Webb

    #2
    Re: get the html source code from iframe

    Guoqi Zheng wrote:[color=blue]
    > Dear sir,
    >
    > I am writting an WYSIWYG html editor, I need to get the html source code out
    > of an iframe. I know I can use innerhtml or innertext. But that will remvoe
    > the html header info which is what I need. html header may contains
    > reference to base url or style sheet information.
    >
    > How can I get the full source code out of an iframe???[/color]

    ..innerText is IE-only but your Editor probably is also.

    document.docume ntElement.outer HTML will give you 99% of whats in the
    current document. It doesn't give the DTD Declaration but seems to give
    everything else.


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

    Comment

    • Andrew Poulos

      #3
      Cursor to not highlight

      How can I stop a user's cursor from selecting/highlighting elements in a
      window as they click and drag across the window? Though I want them to
      still be able to click buttons etc.


      Andrew Poulos

      Comment

      Working...