Re: Transfer javascript code from iFrame to a DIV



sameergn@xxxxxxxxx wrote:

I have HTML form whose target is an invisible IFrame. After the IFrame
is loaded completely, following code transfers contents of IFrame to DIV

document.getElementById("mainDiv").innerHTML =
test_iframe.document.body.innerHTML;

<URL:http://pointedears.de/scripts/test/whatami#inference>

but this does not seem to carry over the Javascript code from IFrame to
DIV. Can anyone comment if this is the correct behavior or a bug?

`innerHTML' is a proprietary feature, so everything regarding it can be
considered correct behavior, even bugs.

(The requirement is to submit a form and update only portion of screen,
without using AJAX. A DIV cannot be target of the FORM, hence the
IFrame->DIV route)

This is utter nonsense. Simply make the IFrame visible in the first
place, and use CSS to style it.


PointedEars
--
A man who works with his hands is a laborer; a man who works with his
hands and his brain is a craftsman; but a man who works with his hands
and his brain and his heart is an artist.
-- Louis Nizer, lawyer (1902-1994)
.



Relevant Pages

  • Re: Document loaded:how to detect?
    ... The whole idea is to load into the DIV different texts clicking on the corresponding button. ... Let alone script injection, actually the code, in a nutshell, is: ... -frdata = a reference to the frame 'container' of div and iframe ... The button that should start the process of loading the iframe and transferring the content to the div is: ...
    (comp.lang.javascript)
  • Re: dynamic menu
    ... The problem occurs because of the z-index behaviour of HTML elements. ... "So what that means is an IFrame can block out the select box, ... DIV at the same time. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Editable IFRAME
    ... I have an editable Iframe control that I am using to allow users to ... two ways to accomplish this. ... when the button is clicked it moves the DIV based on how high the DIV ... location is set in the cells valign property. ...
    (comp.lang.javascript)
  • Re: newbie: css position of IFRAME
    ... Jeff wrote: ... > I want the iframe to fill the entire space the DIV it is ... side language tools (PHP, ASP, Server side inlcudes, etc). ...
    (alt.html)
  • Re: IE6 Bug Workaround ?????
    ... Using an iframe complicates matters, because I wanted the functionality ... use a "floating" iframe instead of a div. ... this should obscure the DDL, but it appears on the surface. ...
    (microsoft.public.dotnet.framework.aspnet)