On a certain event I open 2 windows, when one is opened instead of the opener. Then I want the second (pop-up)to be closed onload of the first window (i.e - after loadind is finished), if it was not cosed manually of course.
It doesn't work. Can someone please help?
The opener page:
- - - - - - - - - -
function openIt()
{yyy = window.open("x.html","OkWin","width=300,height=100,left="+Math.floor((screen.width-300)/2)+",top="+Math.floor((screen.height-10)/2));
yyy.focus();
}
The page slowly loaded instead of the opener:
- - - - - - - - - - - - - - - - - - - - - -
<script>
function checkTheWin()
{ if (!yyy.closed)
yyy.close();
}
</script>
<body onload="checkWaitWin(">
Thanks
Avivit
It doesn't work. Can someone please help?
The opener page:
- - - - - - - - - -
function openIt()
{yyy = window.open("x.html","OkWin","width=300,height=100,left="+Math.floor((screen.width-300)/2)+",top="+Math.floor((screen.height-10)/2));
yyy.focus();
}
The page slowly loaded instead of the opener:
- - - - - - - - - - - - - - - - - - - - - -
<script>
function checkTheWin()
{ if (!yyy.closed)
yyy.close();
}
</script>
<body onload="checkWaitWin(">
Thanks
Avivit