I have searched this issue on other links like
window.close and self.close do not close the window in Chrome etc. but couldn't able to solve it
I want to close a page using below code, but it's not working on any browser.
my url is like :
Warning :
Scripts may close only the windows that were opened by it.
HTML:
<img alt="Close" src="images/close.png" onclick="return confirm_delete();">
Script:
function confirm_delete()
{
if (confirm("Are you sure you want to close?") == true)
window.close();
else
return false;
}
Here is the screenshot: