View Single Post
  #2 (permalink)  
Old 10-29-2007, 04:53 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Smile Re: Is it possible to close the parent window (main web browser window) from a child

A:

Put the following in the child:

<script langauge="JavaScript">
<!--
opener.close();
//-->
</script>
Although you'll need to make sure that the opener has been defined for browsers that don't have it by default, by placing the following in the parent:

<script language="JavaScript">
<!--
msgWindow=open('',window,'resizable=no,width=200,h eight=200');
msgWindow.location.href ='apage.html';
if (msgWindow.opener == null) msgWindow.opener = self;
//-->
</script>
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Reply With Quote