Hi,
Does anyone know the correct code for closing a child window? I want to be able to close the child window on the unload event of its parent window. But i cant seem to get it working. Here is some code:
----------------------------------------
Parent Window
----------------------------------------
<SCRIPT LANGUAGE="JavaScript">
function loadit()
{
var url = 'banner.htm';
var x = window.open(url,'statuswin1','height=50,width=160,scrollbars=no,toolbar=0,titlebar=0');
}
function flush()
{
newwin.document.thefunction();
}
</SCRIPT>
</head>
<body onunload="flush();">
-------------------------------------------------
Child Window:
-------------------------------------------------
<SCRIPT LANGUAGE="JavaScript">
function thefunction()
{
self.close();
}
</SCRIPT>
-------------------------------------------------
Thanks for any help!
Does anyone know the correct code for closing a child window? I want to be able to close the child window on the unload event of its parent window. But i cant seem to get it working. Here is some code:
----------------------------------------
Parent Window
----------------------------------------
<SCRIPT LANGUAGE="JavaScript">
function loadit()
{
var url = 'banner.htm';
var x = window.open(url,'statuswin1','height=50,width=160,scrollbars=no,toolbar=0,titlebar=0');
}
function flush()
{
newwin.document.thefunction();
}
</SCRIPT>
</head>
<body onunload="flush();">
-------------------------------------------------
Child Window:
-------------------------------------------------
<SCRIPT LANGUAGE="JavaScript">
function thefunction()
{
self.close();
}
</SCRIPT>
-------------------------------------------------
Thanks for any help!