Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q970 How can I load an alien URL (i.e. a URL from another site) in one frame into the top window?

irt.org | Knowledge Base | JavaScript | Frame | Q970 [ previous next ]

Q970 How can I load an alien URL (i.e. a URL from another site) in one frame into the top window?

The _new_ security model in Netscape Navigator 4+ actually allows you to ask for extra privileges from the user to be able to do this. With the _old_ security model, you wouldn''t even have been able to ask.

<script language="JavaScript1.2"><!--
function doit() {
    if (document.layers) {
        netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');
        top.location.href = parent.frames[1].history[parent.frames[1].history.length - 1];
    }
}
//--></script>

<a href="javascript:doit()">kill frame</a>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.