Print Page | Close Window

JavaScript: open in parent window

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=8426
Printed Date: 29 March 2026 at 12:32pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: JavaScript: open in parent window
Posted By: zMaestro
Subject: JavaScript: open in parent window
Date Posted: 30 December 2003 at 9:36am

there is a simple JavaScript code that forces the opening of the page in the parent window and not in Frames as when coming from hotmail, i just can't find it :'(

something like

if not parentframe  = the whole window
then parentframe = the whole window

can anyone help me with this script  




Replies:
Posted By: WebWiz-Bruce
Date Posted: 30 December 2003 at 10:06am
<script language="JavaScript"><!-- 
if (self.parent.frames.length != 0){
(self.parent.location=document.location)
}
//-->
</script>


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net