0

I have a confirm() method that launches in the opening of a page. I want this page to be closed if the OK option is selected... Is there a solution ?

I've read that you can't close window that were not created by a script is it absolute truce ?

In my idea it were something like that :

if (confirm("Leave")) {
    close();
}

But it does not work and this is the console output :

Scripts may close only the windows that were opened by it.

Baldráni
  • 5,332
  • 7
  • 51
  • 79

0 Answers0