My application sends an e-mail to the manager with an approve and a reject button
- When the manager clicks the button, the web page will open.
- In that page is a close button. On click of close button it should close the browser window. But it is not closing and it throws an error message on console "Scripts may not close windows that were not opened by script."
I tried to close the window, i.e, already open. The fallowing ways
var win = window.open('','_self');
win.close();
window.top.opener=null;
window.close();
var win=window.open("","_self");
win.close();
window.open('','_parent','');
window.close();
The above did not work. Can someone provide a solution for this.
Thank you in advance. Please don't close this. Because i googled lot, I did not find solution.