One function in my website requires that the website be opened in a new window rather than a new tab.
Is there any way to determine if the page is opened in a new window or a new tab and show an informative message to user?
-----Edited and added below to distinguish from an already asked and answered question.-------------
I do not want to open my page in a new window if it has already been opened in a new window.
I want to determine if the page is opened in a new window and if not, to provide an informative message to the user and give the option to open my website in a new window, if the user so chooses.
One of the functions on my website involves resizing the window to half its original size. Resizing is not possible inside a tab and hence this question.
The workflow is:
1) Open my website.
2) Determine if it is in a new window.
3) If yes, then continue.
4) If no, then advise visitor about the need to open in a new window and provide button, "Open in a new window?".
5) If clicked, Open the website in a new window (with a unique window name) and change focus to the new window.
6) If not clicked - continue as a tab.
Some functions which require resizing, will not work properly as a tab, though.
--------End of edit------------