Sorry to post again in a new thread, the other one was marked as resolved so I figured nobody would look at it.
I wanted to make another function that moves the text from the master(parent) page into the iframe.
Here is the code again.(moveText) is the function that I cant figure out.
I wanted to make another function that moves the text from the master(parent) page into the iframe.
Here is the code again.(moveText) is the function that I cant figure out.
Code:
<body>
<style type="text/css">
#div1 { color:red }
#div2 { color:blue }
#div3 { color:green }
</style>
<div id="div1">
This is word one
</div>
<iframe name=myiframe src=iframe2.php width=300 height=300 frameborder=1 scrolling=no></iframe>
<script language="javascript">
function newText() {
document.getElementById('div1').innerHTML=myiframe.document.getElementById('div2').innerHTML;
}
function moveText() {
window.parent.getElementById(...?
}
</script>
<form>
<input type="button" value="New Text" onclick="newText()" />
</form>
<p>
<form>
<input type="button" value="Move Text" onclick="moveText()" />
</form>
</body>