craigr7
01-02-2012, 06:29 AM
With the help of Aerospace_Eng in a 2005 codingforums thread, now I can use one link (for example in a page about Topic 3) to load two related pages about Topic 4 (left-4.htm and right-4.htm) into the “left” and “right” iframes, using the code below.
___Is it possible to use this code, suitably supplemented, to also specify the frameset at “home.htm” if an external link to “right-4.htm” loads it into a browser without the frameset? (i.e. by putting a link into right-4.htm that will load it and left-4.htm into the iframe-context of home.htm)
<head>
<script> function changeLink(link) { parent.right.location=link; } </script>
</head>
<body>
<a href="left-4.htm" target="left" onclick="changeLink('right-4.htm'); return true">for Topic 4</a>
</body>
___Is it possible to use this code, suitably supplemented, to also specify the frameset at “home.htm” if an external link to “right-4.htm” loads it into a browser without the frameset? (i.e. by putting a link into right-4.htm that will load it and left-4.htm into the iframe-context of home.htm)
<head>
<script> function changeLink(link) { parent.right.location=link; } </script>
</head>
<body>
<a href="left-4.htm" target="left" onclick="changeLink('right-4.htm'); return true">for Topic 4</a>
</body>