Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>Edit:</strong> I have been looking into this a little further. </p> <p>Seems like there is no different "type" on these windows, simply different options. A way I found to check if it was a tab or window is to check <code>window.menubar.visible</code>. For the tab, which is a full and normal window it is <code>true</code>, and for the pop-up the menu is hidden and therefore <code>false</code>. Same applies to <code>window.toolbar.visible</code>.</p> <p>Works in FF and Chrome at least. Unfortunately not in IE. (Testing done in IE8, which is the version I have installed. For testing of course..)</p> <p>Example:</p> <pre><code>if(window.menubar.visible) { //Tab } else { //"Child" Window } </code></pre> <p>Found this thread: <a href="https://stackoverflow.com/questions/6654297/internet-explorer-8-js-error-window-toolbar-visible-is-null-or-not-an-object">Internet Explorer 8 JS Error: &#39;window.toolbar.visible&#39; is null or not an object</a></p> <hr> <p>If you specify width and height, it means that you also have to specify the <code>name</code> parameter. This can be used in the same way <code>target</code> in an <code>a</code> tag is used, and defaults to <code>_blank</code>.</p> <p>If you do not specify width and height I assume you also don't specify <code>name</code> and therefore it is opened with <code>name=_blank</code>, which means a new Tab.</p> <p>If you specify width and height, are you setting a custom <code>name</code>? Doing so results in a child window. If you specify a name, or empty string as name, I suggest you try <code>name:_blank</code> if you want it to be a new tab. </p> <p>If the window was opened with a name, you can always the <code>window.parent</code> from the child window. If you open with <code>_blank</code> I am not sure if you can get the <code>window.parent</code></p> <p><a href="http://www.w3schools.com/jsref/met_win_open.asp" rel="nofollow noreferrer">w3schools Window Open</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload