Link to home
Start Free TrialLog in
Avatar of jws2bay
jws2bay

asked on

Open and Close Br window, but close it so it is gone.

I want to open a information popup and then have it close when focus is lost.
I find that the window closes, or I should say that focus is returned to the parent page, but  the
is still open in the background and you can be tabbed to it as a window.  I want it to be gone.



Here is my test case:
----------------------------------
<button onclick="myFunction()">Open</button>

<script>
function myFunction() {
    var myWindow = window.open('W4_tech_detail.php?Part_no=SGCU1CH','','scrollbars=yes,resizable=yes,width=700,height=600');
    myWindow.focus();
    myWindow.onblur=mywindow.close;    
}
</script>
------------------------------------------

Here is my test URL :        https://www.eshowerdoor.com/test-window.html
ASKER CERTIFIED SOLUTION
Avatar of Swatantra Bhargava
Swatantra Bhargava
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jws2bay
jws2bay

ASKER

Thanks for the info.