B
bs9999
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).
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.
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).
append all script tags and relevant html elements into my main page'sFrom there I plan on scraping the IFRAME via Javascript to gather then
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.