Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q680 Is there a way to do these two things : make a link to open a pop up window and specify that one of the two files contained in that pop up window must be open at the anchor specified?

You are here: irt.org | FAQ | JavaScript | Frame | Q680 [ previous next ]

In the first page:

<SCRIPT LANGUAGE="JavaScript"><!--
function myOpen(anchor) {
    window.open('popup.htm?' + escape(anchor),'windowName','width=200,height=200');
}
//--></SCRIPT>

<A HREF="javascript:myOpen('myanchor')">Open popup window frameset at anchortext</A>

In popup.htm:

<HTML>

<SCRIPT LANGUAGE="JavaScript"><!--
document.write('<FRAMESET COLS="50%,50%">');
document.write('<FRAME SRC="leftframe.htm' + (location.search ? ('#' + unescape(location.search.substring(1))):'') + '">');
document.write('<FRAME SRC="rightframe.htm">');
document.write('<\/FRAMESET>');
//--></SCRIPT>

</HTML>

©2018 Martin Webb