I have the following layout
_______________________________________________________ | iframe | | ______ _____________________________________ ______ | || menu ||info ||advert|| || || || || || || || || || || || || || || || ||
I have read many pages of answers and they all seem to say the same things, but i still can't get my code to work.
I want links in my MENU to change the iframe, which will load new topics each with their own menu. Also some pages in my INFO box need to change the source of the iframe.
An example is when I want to log out of my account and return to my homepage: I hit LOGOUT on the MENU, which loads logout.php into INFO and nulls all variables followed by this ...
<script type="text/javascript">
top.document.getElementById('iframeid').src='home.php';
</script>
I have also tried (and variations of)
document.getElementById('iframeid').src='home.php';
parent.document.getElementById('iframeid').src='home.php';
top.document.getElementById('iframeid').location='home.php';
top.document.getElementById('iframeid').location='WEBSITE/home.php';
It looks like such a simple thing, but I have now spent over 24 hours on this - any clues please?