I've been working on an issue with my program executing too quickly to detect whether popup is being blocked by the browser. Even with the timeout, sometimes the window that is opened doesn't get closed. I've also tried opening a window and passing a value back to the parent window and that didn't work either.
setTimeout(DetectPopUp(), 1000);
function DetectPopUp() {
var puTest = setTimeout(window.open("", "", "width=1,height=1,top=2000"));
try {
puTest.close();
return false;
} catch (e) {
return true;
}
}
Any ideas on how to do this?