Transfer javascript code from iFrame to a DIV



Hi,

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;

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?
(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)

Thanks,
Sameer

.



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: Transfer javascript code from iFrame to a DIV
    ... I have HTML form whose target is an invisible IFrame. ... following code transfers contents of IFrame to DIV ...
    (comp.lang.javascript)