fischadler
Programmer
Hi I am using the code below to open a pop up window.
The problem with that is that if the pop is not already open, I will get an error (NewWindow is not yet defined) and nothing happens. The reason I want to close the pop up before opening another one is that otherwise, if the pop is in the background, it will remain there and people might not necessarily realise it's contents were changed. So I thought that closing it and popping it up again will bring it to the front. Another option would be to 'simply' make the pop up window come to the front after it is loaded or it's contents changed. But I don't know how to do that.
-Fischadler
Code:
<script>
<!-- Hide from old browsers
function winopen(PageURL){
window.open(PageURL, 'NewWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,
copyhistory=yes,width=750,height=400,left=0,top=0')
}
// -->
</script>
<tr onMouseOver="this.bgColor='#C0C0FF';" onMouseOut="this.bgColor='#FFFFFF';" style="cursor: hand"
ONCLICK="NewWindow.close(); return false; winopen('mypage.asp')">
The problem with that is that if the pop is not already open, I will get an error (NewWindow is not yet defined) and nothing happens. The reason I want to close the pop up before opening another one is that otherwise, if the pop is in the background, it will remain there and people might not necessarily realise it's contents were changed. So I thought that closing it and popping it up again will bring it to the front. Another option would be to 'simply' make the pop up window come to the front after it is loaded or it's contents changed. But I don't know how to do that.
-Fischadler