You are here: irt.org | FAQ | JavaScript | Window | Q349 [ previous next ]
Are all these pages on the same server? If not then no - as one file on one server cannot get the details of another file from another server. If its a file from the same server, then you might try the following:
In the popup window:
<SCRIPT LANGUAGE="JavaScript"><!-- function DoMagicalStuff() { opener.location.href = 'magic.htm' + '?' + escape(opener.top.info.location); } //--></SCRIPT> <FORM> <INPUT TYPE="BUTTON" onClick="DoMagicalStuff()"> </FORM>
And then in magic.htm:
<HTML> <SCRIPT LANGUAGE="JavaScript"><!-- document.write('<FRAMESET COLS="50%,50%">'); document.write('<FRAME SRC="apage.htm">'); document.write('<FRAME SRC="' + unescape(location.search.substring(1)) + '">'); document.write('<\/FRAMESET>'); //--></SCRIPT> </HTML>