From a parent window a new child window is open with window.open
[HTML]<script type="text/javascript" language="JavaScript" >
function abc()
{
if(window.event.clientY <0 && window.event.clientY <-80 )
{
if (win2 && !win2.closed) // win 2 is the child window
{
alert("Do you want to close all windows");
win2.close();
}
}
else if (win2 && !win2.closed)
{
win2.close();
}
}
</script>
<body bgcolor="#F7F7ef" onUnload="abc()">
[/HTML]
This works with IE , Opera .. this code doesnt work with Mozilla Netscape. What i require when closing the parent page by clciking the X button it should give an alert that ur closing the pages . when logout is pressed , it should give an alert it should just close the child window .Could anyone give me a solution for this