How do I inject new content into an iframe?

How can i inject new content into an iframe. I found this code but can’t get it to work:

You can see the 404 and position problem on vivinow.com/boydtest2/ and the code is as follows:

[iframe src=”http://vivinow.com/atravelsquire/#travelsquire” width=”700px” height=”600px” scrolling=”yes”]

<div>

<p>this a paragraph

<script type=”text/javascript”>

var newIframe = document.createElement(‘iframe’:wink:;

newIframe.width = ‘900’;newIframe.height = ‘500’;

newIframe.src = ‘myIframeContent.html’;

document.body.appendChild(newIframe);

</script>

with an iframe in it.</p>

</div>

<script type=”text/javascript”>

var myIframeContent = ‘<!DOCTYPE html>’

+ ‘<html><head><title>My dynamic document</head>’

+ ‘<body><p>Hello world</p></body></html>’;

newIframe.contentWindow.document.open(‘text/html’, ‘replace’:wink:;

newIframe.contentWindow.document.write(myContent);

newIframe.contentWindow.document.close();

</script>

Thanks,

Boyd