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

Q1005 How can I open an alien frame into a new window?

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

This can be done in Netscape Navigator 4+, but only after requesting extra privileges from the user:

<SCRIPT LANGUAGE="JavaScript"><!--
var windowHandle = '';

function doit() {
    if (document.layers) {
        netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');
        windowHandle = window.open(parent.frames[1].history[history.length - 1],'windowName','width=640,height=480');
    }
}
//--></SCRIPT>

<FORM>
<INPUT TYPE="BUTTON" onClick="doit()" VALUE="Open other frame in new window">
</FORM>

©2018 Martin Webb