From: FAQ server on
-----------------------------------------------------------------------
FAQ Topic - How do I open a new window with javascript?
-----------------------------------------------------------------------

New windows can be opened on browsers that support the
` window.open ` function and are not subject to the action of any
pop-up blocking mechanism with code such as:-

var wRef;
if(window.open){
wRef = window.open("http://example.com/page.html","windowName");
}

https://developer.mozilla.org/en/DOM:window.open

http://www.infimum.dk/HTML/JSwindows.html


The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/

--

The sendings of these daily posts are proficiently hosted
by http://www.pair.com.

From: Dr J R Stockton on
In comp.lang.javascript message <4b3fde09$0$269$14726298(a)news.sunsite.dk
>, Sun, 3 Jan 2010 00:00:02, FAQ server <javascript(a)dotinternet.be>
posted:
>
>New windows can be opened on browsers that support the
>` window.open ` function and are not subject to the action of any
>pop-up blocking mechanism with code such as:-
>
>var wRef;
>if(window.open){
>wRef = window.open("http://example.com/page.html","windowName");
>}

That appears, when read carefully, to be possibly true.

But if the code

var wRef;
if (window.open) {
wRef = window.open("http://www.merlyn.demon.co.uk/gullible.htm","X") }

is pasted into the textarea at the bottom of
<http://www.merlyn.demon.co.uk/gravity0.htm> and the adjacent button is
pressed, then a new window, showing gullible, appears in my Firefox
3.0.15.

My Firefox 3.0.15, if caused to look at all of the external links which
from time to time appear in <http://www.spacetoday.net/>, sometimes
plausibly claims to have blocked a pop-up (pop-unders are not 100%
blocked ;-( ).

Therefore, what appears to be and will normally be taken as a necessary
condition, "not subject to the action of any ...", is apparently not a
necessary condition, and the FAQ section needs to be corrected.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (RFCs 5536/7)
Do not Mail News to me. Before a reply, quote with ">" or "> " (RFCs 5536/7)