What I want to do -

> 
> 1) On Click of a button I will open a new window(popup). 
> 
> 
> 2) When I
>  click on same button, If the window(popup)is already open I will not
>  open it again instead bring the previously opened window(popup) on top
>  of all windows.
> 
> 
> 3) If popup is not open I will use window.open() to open a popup.
> 
> 
> 

What I did till now -

> 
> 1) On Click of a button I will open a new window(popup). 
> 
> 
> 2) *Problem* : How do I not allow opening of new window on click of button if window is already open?
> 
> 
>