Interacting with IFRAME contents

Discussion in 'Javascript' started by bs9999@gmail.com, Dec 11, 2006.

  1. Guest

    I'm using IFRAME to connect back to my ASP.NET page in order to fetch
    the FreeBox HTML Editor html contents and scripts (i do this apprach
    because the html editor is fairly heafty to send to the user when most
    dont use it on our site instead deferring to a user request before
    actually sending down the code via AJAX or in this case an IFRAME).
    >From there I plan on scraping the IFRAME via Javascript to gather then

    append all script tags and relevant html elements into my main page's
    DOM, outside of the iframe.

    I've used iframe.contentDocument() and then myiframedoc.body.innerHTML
    and getElementsByTagName("head")[0] / ("body")[0] to extract the
    contents from the iframe. I am able to see the code and nodes and even
    append it to my main page (ie. add <script> nodes from the iframe into
    my main page's head area). For the most part nothing happens. I was
    expecting the downloaded IFRAME contents (which is hidden from view)
    would visibly appear in my main page. This is not the case. Nothing
    happens at all. It's as if FF and IE refuse to kickstart their
    rendering engines to visually acknowledge the new nodes. Weird.

    At times I have spotted IE even making the attempt to redload a <script
    src> element once it has been newly added to my main page. It
    downloads fine but again nothing happens. I try to access declared
    variables within the script block and only get back Undefined. Im
    still gathering the details but it seems like all script blocks and
    <link> elements are the problems between the iframe and my main js app.

    Can someone please tell me how Im going about accessing the DOM
    incorrectly?

    Thank you.
    , Dec 11, 2006
    #1
    1. Advertising

  2. ASM Guest

    a écrit :
    >
    > Can someone please tell me how Im going about accessing the DOM
    > incorrectly?


    I think your browsers believe you are trying to do cross-domain
    (that is not tolerated) and it is exactly what you do :
    domain of FreeBox <-> localhost


    --
    Stephane Moriaux et son (moins) vieux Mac déjà dépassé
    Stephane Moriaux and his (less) old Mac already out of date
    ASM, Dec 11, 2006
    #2
    1. Advertising

  3. Guest

    No, this is all done on my own server. Im aware of cross domain
    restrictions and this is not the case as alreadt mentioned


    ASM wrote:
    > a écrit :
    > >
    > > Can someone please tell me how Im going about accessing the DOM
    > > incorrectly?

    >
    > I think your browsers believe you are trying to do cross-domain
    > (that is not tolerated) and it is exactly what you do :
    > domain of FreeBox <-> localhost
    >
    >
    > --
    > Stephane Moriaux et son (moins) vieux Mac déjà dépassé
    > Stephane Moriaux and his (less) old Mac already out of date
    , Dec 11, 2006
    #3
    1. Advertising

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. Timothy Parez

    Interacting with Windows Services

    Timothy Parez, Apr 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,797
  2. John
    Replies:
    4
    Views:
    498
    Joe Agster
    Jul 2, 2003
  3. =?Utf-8?B?bGF4bWk=?=

    interacting windows application

    =?Utf-8?B?bGF4bWk=?=, Jun 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    359
    adnan boz
    Jun 8, 2004
  4. =?Utf-8?B?ZGF2aWQ=?=
    Replies:
    2
    Views:
    479
    Bruce Barker
    Nov 21, 2005
  5. Daedalous
    Replies:
    3
    Views:
    687
    Daedalous
    Jan 16, 2004
Loading...

Share This Page