I have a parent window where I open a popup with the click of a button:
function Test()
{
$("body").append('<div id="modalPopUp" class="modalOverlay">');
var popupWindow = window.open("test.aspx", 'popUpWindow', 'height=300,width=600,left=100,top=30,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No');
}
Currently I can open the popup and disable the parent window, but now I want to catch the close button of the button + click outside the popups in the popup, so I can remove ModalPopUp from my body so that I can restore the parent of the case. How do I achieve this?
source
share