I'm not sure what you are trying to do, because the links you provided do not work; however, I believe your problem might be caused by your resize function.
Your function:
function changeContent() { document.getElementById('contentDIV').innerHTML = window.frames['contentFRAME'].document.getElementsByTagName('html')[0].innerHTML; }
You take the element 'contentDiv', you take the HTML of your "iframe", and then you set it to your div. This causes your iframe to no longer exist.
For instance:
let's say my content div had this:
<div class="right" id="contentDIV"> <iframe id="contentFRAME" src="raw-form.html" name="contentFRAME" onLoad="changeContent()" style="height:0; width:0; border-width:0;">Loading...</iframe> </div>
My iframe has only 1 link: <a href="www.example.com">Example Link</a>
After your function, your contentDiv now looks like this:
<div class="right" id="contentDIV"> <a href="www.example.com">Example Link</a> </div>
you have effectively removed your iframe and put the iframe content (link) in your main div. Now, if you click on an item, it will automatically open on the same page - that is, the "parent", but there is no longer a parent!
So go on, you should not replace the contents; instead, you should change the height / width of the iframe. Look at: Adjust the width of the iframe so that it matches the content in it
source share