1<a onclick="window.open(document.URL, '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');">
2Open New Window
3</a>
1var newWin = open('url','windowName','height=300,width=300');
2newWin.document.write('html to write...');
3
1<script type="text/javascript">
2var windowObjectReference = null; // global variable
3
4function openFFPromotionPopup() {
5 if(windowObjectReference == null || windowObjectReference.closed)
6 /* if the pointer to the window object in memory does not exist
7 or if such pointer exists but the window was closed */
8
9 {
10 windowObjectReference = window.open("http://www.spreadfirefox.com/",
11 "PromoteFirefoxWindowName", "resizable,scrollbars,status");
12 /* then create it. The new window will be created and
13 will be brought on top of any other window. */
14 }
15 else
16 {
17 windowObjectReference.focus();
18 /* else the window reference must exist and the window
19 is not closed; therefore, we can bring it back on top of any other
20 window with the focus() method. There would be no need to re-create
21 the window or to reload the referenced resource. */
22 };
23}
24</script>
25
26(...)
27
28<p><a
29 href="http://www.spreadfirefox.com/"
30 target="PromoteFirefoxWindowName"
31 onclick="openFFPromotionPopup(); return false;"
32 title="This link will create a new window or will re-use an already opened one"
33>Promote Firefox adoption</a></p>
34