Expand|Select|Wrap|Line Numbers
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" >
- <head>
- <title>Test1</title>
- <meta name="revision" content="$Id: $" />
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <meta name="keywords" content=""/>
- <meta name="description" content=""/>
- <link rel="stylesheet" type="text/css" href="/local-stylesheet.css"/>
- <script>
- function copy_frame(argFrm1, argFrm2) {
- //window.frames["ifrm2"].document.body.innerHTML = "<p>hello</p>"; // works, frame has hello
- //window.document.body.innerHTML = "<p>hello</p>"; // works, replaces document with hello.
- window.document.body = window.frames["ifrm1"].document.body; // this works!
- //window.frames["ifrm2"].document.body = window.frames["ifrm1"].document.body; // This causes both to go blank.
- }
- </script>
- </head>
- <body>
- <div id="insert"></div>
- <div id="div4frm1">
- <iframe name="ifrm1" id="ifrm1" src="http://www.local.com" >
- use firefox
- </iframe>
- </div>
- <div id="div4frm2">
- <iframe name="ifrm2" id="ifrm2" src="" >
- Get firefox
- </iframe>
- </div>
- <div id="move">
- <INPUT TYPE="button" onClick="copy_frame(ifrm1, ifrm1);" value="copy" ID="b">
- </div>
- </body>
- </html>