The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

What happens if we execute the window.open() method twice, with the same sName argument? Like HTML-generated windows, if you specify the name of a window that already exists, open() simply uses that existing window rather than opening a new one. Take a look at the following script:

window.open("[url=http://www.javascript.com/]http://www.javascript.com/[/url]", "win");window.open("[url=http://www.docjs.com/]http://www.docjs.com/[/url]", "win");If you execute these statements, the browser opens a new window named "win" to display the [url=http://www.javascript.com]www.javascript.com[/url] page. But the second statement then replaces the URL of the new window with [url=http://www.docjs.com]www.docjs.com[/url]. The following statements generate two different windows to display these Web sites:

window.open("[url=http://www.javascript.com/]http://www.javascript.com/[/url]", "win1");window.open("[url=http://www.docjs.com/]http://www.docjs.com/[/url]", "win2");Go ahead and run these statements. The browser opens two new windows. The first one, named "win1", loads the URL [url=http://www.javascript.com]www.javascript.com[/url], while the other window, named "win2", loads the URL [url=http://www.docjs.com]www.docjs.com[/url]. Note that [url=http://www.docjs.com]www.docjs.com[/url] is the same as [url=http://www.webreference.com/js]www.webreference.com/js[/url].If we don't specify a name for the new window, the browser automatically launches a new window. The same applies to the name "_blank", but an empty string is another story. There are several important differences between Internet Explorer and Navigator:

Something I picked up from webreference a while back on using windows and Javascript.