<a href="index.php?check=true&target=manager&action=open" onClick="window.open('manager.php',...)>link</a>
But I want that the main window redirects to page A when the popup is succesfully opened, if the popup didn't open (it's the main interface of the application), the main window should be redirected (window.location or something) to page B. And finally, the main window should go to page C when the popup is closed. It's important that the popup stays focused when the main window is redirected to page A for example. I tried window.opener.location, but the main window receives focus when it's edited.
1) open popup when user clicks link
2) if popup is success -> redirect main window to page A
3) if popup isn't success (by a popup blocker for example) -> redirect main window to page B
4) if popup is closed by user -> redirect main window to page C