1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
|
---
title: window.open
slug: Web/API/Window/open
tags:
- DOM
- Dokumentacja_Gecko_DOM
- Gecko
- Strony_wymagające_dopracowania
- Wszystkie_kategorie
translation_of: Web/API/Window/open
---
<p>{{ ApiRef() }}</p>
<h2 id="Podsumowanie" name="Podsumowanie">Podsumowanie</h2>
<p>Tworzy nowe okno przeglądarki i wczytuje do niego wskazany zasób.</p>
<h2 id="Sk.C5.82adnia" name="Sk.C5.82adnia">Składnia</h2>
<pre class="eval"><var>referencjaDoObiektuOkna</var> = window.open(<var>strUrl</var>, <var>strNazwaOkna</var> [, <var>strCechyOkna</var>]);
</pre>
<h3 id="Parametry_i_zwracana_warto.C5.9B.C4.87" name="Parametry_i_zwracana_warto.C5.9B.C4.87">Parametry i zwracana wartość</h3>
<dl>
<dt><code>referencjaDoObiektuOkna</code></dt>
<dd>Referencja wskazująca na obiekt nowoutworzonego okna to wartość zwracana przez metodę open(). Jeżeli z jakichś powodów nie uda się otworzyć okna, zwrócone zostanie <code>null</code>. Referencje taką dobrze jest przechowywać w zmiennej globalnej. Możesz wtedy użyć jej do do pobrania właściwości nowego okna lub wywołania jego metod - pod warunkiem, że zależność między głównym a nowym oknem spełnia <a class="external" href="http://www.mozilla.org/projects/security/components/same-origin.html">Zasadę tego samego pochodzenia</a> - wymaganą ze względów bezpieczeństwa.</dd>
</dl>
<dl>
<dt><code>strUrl</code></dt>
<dd>Adres URL, który ma zostać wczytany w nowym oknie. Może to być dokument HTML gdzieś w Sieci, może to być obrazek lub dowolny inny plik, który może obsłużyć przeglądarka.</dd>
</dl>
<dl>
<dt><code>strNazwaOkna</code></dt>
<dd>Ciąg znaków używany jako nazwa okna. Nazwy tej można użyć jako celu dla odnośników i formularzy, określanego za pomocą atrybutu <code>target</code> elementu <code style="font-size: 1em;"><a></code> lub <code style="font-size: 1em;"><form></code>. Nazwa nie powinna zawierać spacji. <var>strNazwaOkna</var> nie określa tytułu nowego okna.</dd>
</dl>
<dl>
<dt><code>strCechyOkna</code></dt>
<dd>Parametr opcjonalny. Jest to ciąg znaków, w którym wymienione zostają cechy (funkcjonalność, paski narzędzi) nowego okna przeglądarki. Parametr ten nie może zawierać żadnych spacji. Każda żądana cecha okna oddzielana jest od innych za pomocą przecinka.</dd>
</dl>
<h2 id="Opis" name="Opis">Opis</h2>
<p>Metoda <code>open()</code> tworzy nowe okno przeglądarki, podobnie jak przy wybraniu polecenia Nowe okno w menu Plik. Parametr <var>strUrl</var> określa URL, który ma zostać pobrany i załadowany w nowym oknie. Jeśli <var>strUrl</var> jest pustym ciągiem, utworzone zostanie puste okno (URL <code>about:blank</code>) z domyślnym zestawem pasków głównego okna.</p>
<p>Zauważ, że zdalny URL nie zostanie załadowany od razu. Po zakończeniu wykonywania <code>window.open()</code> okno zawsze zawiera <code>about:blank</code>. Faktyczne pobieranie z adresu URL jest opóźniane do momentu zakończenia wykonywania bieżącego bloku skryptu. Tworzenie okna i ładowanie wskazanego zasobu odbywają się asynchronicznie.</p>
<h4 id="Przyk.C5.82ady" name="Przyk.C5.82ady">Przykłady</h4>
<pre><script type="text/javascript">
/* Deklaracja zmiennej globalnej, w której będzie
przechowywana referencja do nowego okna */
var WindowObjectReference;
function openRequestedPopup()
{
WindowObjectReference = window.open("http://www.cnn.com/", "CNN_WindowName",
"menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes");
}
</script>
</pre>
<pre><script type="text/javascript">
var WindowObjectReference; // zmienna globalna
function openRequestedPopup()
{
WindowObjectReference = window.open("http://www.domainname.ext/path/ImageFile.png",
"DescriptiveWindowName",
"resizable=yes,scrollbars=yes,status=yes");
}
</script>
</pre>
<p>Jeśli istnieje już okno o tej samej nazwie <var>strWindowName</var>, to zamiast otwierania nowego okna w istniejącym oknie zostanie załadowany URL <var>strUrl</var>. W takim wypadku wartością zwracaną jest referencja do istniejącego okna, a parametr <var>strWindowFeatures</var> jest ignorowany. Wywołanie metody z pustym ciągiem jako <var>strUrl</var> to sposób uzyskania referencji do otwartego okna jeśli znana jest jego nazwa. Zawartość tego okna nie zostanie zmieniona. Jeśli chcesz otwierać nowe okno przy każdym wywołaniu <code>window.open()</code>, podaj specjalną wartość <var>_blank</var> jako parametr <var>strWindowName</var>.</p>
<p><var>strWindowFeatures</var> to opcjonalny ciąg znaków z rozdzieloną przecinkami listą żądanych cech nowego okna. Po otwarciu okna nie możesz zmienić jego funkcjonalności czy pasków za pomocą JavaScriptu. Jeśli <var>strWindowName</var> nie określa istniejącego okna i jeśli nie podasz parametru <var>strWindowFeatures</var> (lub będzie on tylko pustym ciągiem znaków), w nowym oknie znajdize się domyślny zestaw pasków głównego okna.</p>
<p>Jeżeli zostanie użyty parametr <var>strWindowFeatures</var>, ale nie zostaną podane cechy określające rozmiar, wymiary okna będą takie same, jak wymiary ostatnio wyrenderowanego okna.</p>
<p>Jeśli zostanie podany parametr <var>strWindowFeatures</var>, ale bez definiowania cech określających pozycję, wtedy współrzędne lewego górnego rogu będą przesunięte o 22 piksele od miejsca, gdzie znajdował się róg ostatnio wyrenderowanego okna. Przesunięcie to jest implementowane przez producentów przeglądarek (w MSIE 6 SP2 wynosi ono 29 pikseli przy domyślnym motywie) - ma ono ułatwiać użytkownikom dostrzeżenie, że otwarto nowe okno. Jeśli ostatnio używane okno było zmaksymalizowane, przesunięcie o 22 piksele nie zostanie użyte - nowe okno także będzie zmaksymalizowane.</p>
<p><strong>Jeśli podajesz <var>strWindowFeatures</var>, cechy, które nie zostaną określone, będą wyłączone lub usunięte</strong> (z wyjątkiem <var>titlebar</var> i <var>close</var>, które domyślnie ustawiane są na <var>yes</var>)>.</p>
<div class="note">
<p><strong>Porada</strong>: Jeśli podajesz parametr <var>strWindowFeatures</var>, zawrzyj tylko te cechy, które chcesz, by były włączone lub wyświetlane; pozostałe (poza <var>titlebar</var> i <var>close</var>) zostaną wyłączone.</p>
</div>
<p><img alt="Firefox Chrome Toolbars Illustration" class="internal" src="/@api/deki/files/2311/=FirefoxChromeToolbarsDescription7a.gif"></p>
<h4 id="Pozycja_i_rozmiar_okna" name="Pozycja_i_rozmiar_okna">Pozycja i rozmiar okna</h4>
<ul>
<li><a href="#Note_on_position_and_dimension_error_correction">Note on position and dimension error correction</a></li>
<li>{{bug(176320) }}</li>
<li><a href="#Note_on_precedence">Note on precedence</a></li>
</ul>
<dl>
<dt>left</dt>
<dd><span id="left">Określa odległość</span> między lewą krawędzią obszaru roboczego aplikacji w systemie operacyjnym użytkownika a najbardziej wysuniętą w lewo częścią obramowania nowego okna przeglądarki. Nowe okno nie możo być zainicjowane w miejscu wychodzącym poza ekran.</dd>
<dd>Obsługiwane przez: <img alt="Internet Explorer 5+" class="internal" src="/@api/deki/files/2324/=MSIE_ico.png">, <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png">, <img alt="Opera 6+" class="internal" src="/@api/deki/files/2337/=Opera6.gif"></dd>
</dl>
<dl>
<dt>top</dt>
<dd><span id="topS">Określa odległość</span> między górną krawędzią obszaru roboczego aplikacji w systemie operacyjnym użytkownika a najbardziej wysuniętą w górę częścią obramowania nowego okna przeglądarki. Nowe okno nie możo być zainicjowane w miejscu wychodzącym poza ekran.</dd>
<dd>Obsługiwane przez: <img alt="Internet Explorer 5+" class="internal" src="/@api/deki/files/2324/=MSIE_ico.png">, <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png">, <img alt="Opera 6+" class="internal" src="/@api/deki/files/2337/=Opera6.gif"></dd>
</dl>
<dl>
<dt>height</dt>
<dd><span id="height">Określa wysokość</span> obszaru zawartości okna wyrażoną w pikselach. Wartość zawiera wysokość poziomego paska przewijania, jeśli jest on wyświetlany. Wymagana minimalna wartość to 100.</dd>
<dd><a href="#Note_on_outerHeight_versus_height">Note on outerHeight versus height (or innerHeight)</a></dd>
<dd>Obsługiwane przez: <img alt="Internet Explorer 5+" class="internal" src="/@api/deki/files/2324/=MSIE_ico.png">, <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png">, <img alt="Opera 6+" class="internal" src="/@api/deki/files/2337/=Opera6.gif"></dd>
</dl>
<dl>
<dt>width</dt>
<dd><span id="width">Określa wysokość</span> obszaru zawartości okna wyrażoną w pikselach. Wartość zawiera szerokość pionowego paska przewijania, jeśli jest on wyświetlany. Nie jest włączana szerokość panelu bocznego, jeśli jest on otwarty. Wymagana minimalna wartość to 100.</dd>
<dd>Obsługiwane przez: <img alt="Internet Explorer 5+" class="internal" src="/@api/deki/files/2324/=MSIE_ico.png">, <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png">, <img alt="Opera 6+" class="internal" src="/@api/deki/files/2337/=Opera6.gif"></dd>
</dl>
<dl>
<dt>screenX</dt>
<dd>Cecha wycofana. Określa to samo co <a href="#left">left</a>, ale obsługują ją tylko przeglądarki Netscape i oparte o Mozillę.</dd>
<dd>Obsługiwane przez <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>screenY</dt>
<dd>Cecha wycofana. Określa to samo co <a href="#topS">top</a>, ale obsługują ją tylko przeglądarki Netscape i oparte o Mozillę.</dd>
<dd>Obsługiwane przez: <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>outerHeight</dt>
<dd>Określa wysokość całego okna przeglądarki w pikselach. Wartość <code>outerHeight</code> zawiera w sobie wszystkie widoczne paski, poziomy pasek przewijania (jeśli jest widoczny) i obramowanie okna. Minimalna wymana wartość to 100.</dd>
<dd><strong>Uwaga</strong>: ponieważ pasek tytułowy jest zawsze widoczny, wywołanie <code>outerHeight=100</code> zmniejszy <code>innerHeight</code> okna poniżej wymaganych 100 pikseli.</dd>
<dd><a href="#Note_on_outerHeight_versus_height">Note on outerHeight versus height (or innerHeight)</a></dd>
<dd>Obsługiwane przez <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>outerWidth</dt>
<dd>Określa szerokość całego okna przeglądarki w pikselach. Wartość <code>outerWidth</code> zawiera w sobie pionowy pasek przewijania (jeśli jest widoczny) i obramowanie okna. Minimalna wymana wartość to 100.</dd>
<dd>Obsługiwane przez: <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>innerHeight</dt>
<dd>To samo co <a href="#height">height</a>, ale obsługiwane tylko przez przeglądarki Netscape i oparte o Mozillę</dd>
<dd><a href="#Note_on_outerHeight_versus_height">Note on outerHeight versus height (or innerHeight)</a></dd>
<dd>Obsługiwane przez: <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>innerWidth</dt>
<dd>To samo co <a href="#width">width</a>, ale obsługiwane tylko przez przeglądarki Netscape i oparte o Mozillę</dd>
<dd>Obsługiwane przez: <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<h4 id="Toolbar_and_chrome_features" name="Toolbar_and_chrome_features">Toolbar and chrome features</h4>
<dl>
<dt>menubar </dt>
<dd>Jeśli ta opcja jest ustawiona na <var>yes</var>, wtedy nowe okno posiada widoczny pasek menu.</dd>
<dd>Użytkownicy Mozilli i Firefoxa mogą wymusić by każde nowo otwarte okno posiadało widoczny masek menu poprzez ustawienie<br>
<code>dom.disable_window_open_feature.menubar</code><br>
na <var>true</var> w <code>about:config</code> lub w ich <a class="external" href="http://www.mozilla.org/support/firefox/edit#user">pliku user.js</a>.</dd>
<dd>Obsługiwane przez: <img alt="Internet Explorer 5+" class="internal" src="/@api/deki/files/2324/=MSIE_ico.png">, <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>toolbar </dt>
<dd>Jeśli ta opcja jest ustawiona na <var>yes</var>, wtedy nowe okno posiada widoczny pasek nawigacji (Przyciski: poprzednia strona, następna strona, odśwież, zatrzymaj). In addition to the Navigation Toolbar, Mozilla-based browsers will render the Tab Bar if it is visible, present in the parent window.</dd>
<dd>Mozilla and Firefox users can force new windows to always render the Navigation Toolbar by setting<br>
<code>dom.disable_window_open_feature.toolbar</code><br>
to <var>true</var> in <code>about:config</code> or in their <a class="external" href="http://www.mozilla.org/support/firefox/edit#user">user.js file</a>.</dd>
<dd>Obsługiwane przez: <img alt="Internet Explorer 5+" class="internal" src="/@api/deki/files/2324/=MSIE_ico.png">, <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>location </dt>
<dd>If this feature is set to <var>yes</var>, then the new secondary window renders the Location bar in Mozilla-based browsers. MSIE 5+ and Opera 7.x renders the Address Bar.</dd>
<dd>Mozilla and Firefox users can force new windows to always render the location bar by setting<br>
<code>dom.disable_window_open_feature.location</code><br>
to <var>true</var> in <code>about:config</code> or in their <a class="external" href="http://www.mozilla.org/support/firefox/edit#user">user.js file</a>.</dd>
</dl>
<p>Note that MSIE 7 will force the presence of the Address Bar: "We think the address bar is also important for users <strong>to see in pop-up windows</strong>. A missing address bar creates a chance for a fraudster to forge an address of their own. To help thwart that, <strong>IE7 will show the address bar on all internet windows to help users see where they are</strong>." coming from <a class="external" href="http://blogs.msdn.com/ie/archive/2005/11/21.aspx">Microsoft Internet Explorer Blog, Better Website Identification</a></p>
<dl>
<dd>Obsługiwane przez: <img alt="Internet Explorer 5+" class="internal" src="/@api/deki/files/2324/=MSIE_ico.png">, <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png">, <img alt="Opera 6+" class="internal" src="/@api/deki/files/2337/=Opera6.gif"></dd>
</dl>
<dl>
<dt>directories </dt>
<dd>If this feature is set to <var>yes</var>, then the new secondary window renders the Personal Toolbar in Netscape 6.x, Netscape 7.x and Mozilla browser. It renders the Bookmarks Toolbar in Firefox 1.x and, in MSIE 5+, it renders the Links bar. In addition to the Personal Toolbar, Mozilla browser will render the Site Navigation Bar if such toolbar is visible, present in the parent window.</dd>
<dd>Mozilla and Firefox users can force new windows to always render the Personal Toolbar/Bookmarks toolbar by setting<br>
<code>dom.disable_window_open_feature.directories</code><br>
to <var>true</var> in <code>about:config</code> or in their <a class="external" href="http://www.mozilla.org/support/firefox/edit#user">user.js file</a>.</dd>
<dd>Obsługiwane przez: <img alt="Internet Explorer 5+" class="internal" src="/@api/deki/files/2324/=MSIE_ico.png">, <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>personalbar </dt>
<dd>Same as <var>directories</var> but only supported by Netscape and Mozilla-based browsers.</dd>
<dd>Obsługiwane przez: <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>status </dt>
<dd>If this feature is set to <var>yes</var>, then the new secondary window has a status bar. Users can force the rendering of status bar in all Mozilla-based browsers, in MSIE 6 SP2 (<a href="#Note_on_security_issues_of_the_status_bar_presence">Note on status bar in XP SP2</a>) and in Opera 6+. The default preference setting in recent Mozilla-based browser releases and in Firefox 1.0 is to force the presence of the status bar.</dd>
<dd><a href="#Note_on_status_bar">Note on status bar</a></dd>
<dd>Obsługiwane przez: <img alt="Internet Explorer 5+" class="internal" src="/@api/deki/files/2324/=MSIE_ico.png">, <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<h4 id="Window_functionality_features" name="Window_functionality_features">Window functionality features</h4>
<dl>
<dt>resizable </dt>
<dd>If this feature is set to <var>yes</var>, the new secondary window will be resizable.</dd>
<dd><strong>Note</strong>: Starting with version 1.4, Mozilla-based browsers have a window resizing grippy at the right end of the status bar, this ensures that users can resize the browser window even if the web author requested this secondary window to be non-resizable. In such case, the maximize/restore icon in the window's titlebar will be disabled and the window's borders won't allow resizing but the window will still be resizable via that grippy in the status bar.</dd>
</dl>
<div class="note">
<p><strong>Tip</strong>: For accessibility reasons, it is strongly recommended to set this feature always to <var>yes</var>.</p>
</div>
<dl>
<dd>Mozilla and Firefox users can force new windows to be easily resizable by setting<br>
<code>dom.disable_window_open_feature.resizable</code><br>
to <var>true</var> in <code>about:config</code> or in their <a class="external" href="http://www.mozilla.org/support/firefox/edit#user">user.js file</a>.</dd>
<dd>Obsługiwane przez: <img alt="Internet Explorer 5+" class="internal" src="/@api/deki/files/2324/=MSIE_ico.png">, <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>scrollbars </dt>
<dd>If this feature is set to <var>yes</var>, the new secondary window will show horizontal and/or vertical scrollbar(s) if the document doesn't fit into the window's viewport.</dd>
</dl>
<div class="note">
<p><strong>Tip</strong>: For accessibility reasons, it is strongly encouraged to set this feature always to <var>yes</var>.</p>
</div>
<dl>
<dd>Mozilla and Firefox users can force this option to be always enabled for new windows by setting<br>
<code>dom.disable_window_open_feature.scrollbars</code><br>
to <var>true</var> in <code>about:config</code> or in their <a class="external" href="http://www.mozilla.org/support/firefox/edit#user">user.js file</a>.</dd>
<dd><a href="#Note_on_scrollbars">Note on scrollbars</a></dd>
<dd>Obsługiwane przez: <img alt="Internet Explorer 5+" class="internal" src="/@api/deki/files/2324/=MSIE_ico.png">, <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>dependent </dt>
<dd>If set to <var>yes</var>, the new window is said to be dependent of its parent window. A dependent window closes when its parent window closes. A dependent window is minimized on the Windows task bar only when its parent window is minimized. On Windows platforms, a dependent window does not show on the task bar. A dependent window also stays in front of the parent window.</dd>
<dd>Dependent windows are not implemented on MacOS X, this option will be ignored.</dd>
<dd>In MSIE 6, the nearest equivalent to this feature is the <code>showModelessDialog()</code> method.</dd>
<dd>Obsługiwane przez: <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>chrome </dt>
<dd><strong>Note</strong>: Starting with Mozilla 1.7/Firefox 0.9, this feature requires the <code>UniversalBrowserWrite</code> privilege ({{ Bug(244965) }}). Without this privilege it is ignored.</dd>
<dd>If set to <var>yes</var>, the page is loaded as window's only content, without any of the browser's interface elements. There will be no context menu defined by default and none of the standard keyboard shortcuts will work. The page is supposed to provide a user interface of its own, usually this feature is used to open XUL documents (standard dialogs like the JavaScript Console are opened this way).</dd>
<dd>Obsługiwane przez: <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>modal </dt>
<dd><strong>Note</strong>: Starting with Mozilla 1.2.1, this feature requires the <code>UniversalBrowserWrite</code> privilege ({{ Bug(180048) }}). Without this privilege, it is equivalent to <code>dependent</code>.</dd>
<dd>If set to <var>yes</var>, the new window is said to be modal. The user cannot return to the main window until the modal window is closed. A typical modal window is created by the <a href="/pl/DOM/window.alert" title="pl/DOM/window.alert">alert() function</a>.</dd>
<dd>The exact behavior of modal windows depends on the platform and on the Mozilla release version.</dd>
<dd>The MSIE 6 equivalent to this feature is the <code>showModalDialog()</code> method.</dd>
<dd>Obsługiwane przez: <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>dialog </dt>
<dd>The <code>dialog</code> feature removes all icons (restore, minimize, maximize) from the window's titlebar, leaving only the close button. <span class="float-right"><img alt="Firefox and its command system menu under Windows" class="internal" src="/@api/deki/files/2325/=MenuSystemCommands.png"></span>Mozilla 1.2+ and Netscape 7.1 will render the other menu system commands (in FF 1.0 and in NS 7.0x, the command system menu is not identified with the Firefox/NS 7.0x icon on the left end of the titlebar: that's probably a bug. You can access the command system menu with a right-click on the titlebar). Dialog windows are windows which have no minimize system command icon and no maximize/restore down system command icon on the titlebar nor in correspondent menu item in the command system menu. They are said to be dialog because their normal, usual purpose is to only notify info and to be dismissed, closed. On Mac systems, dialog windows have a different window border and they may get turned into a sheet.</dd>
<dd>Obsługiwane przez: <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>minimizable </dt>
<dd>This setting can only apply to dialog windows; "minimizable" requires <code>dialog=yes</code>. If <code>minimizable</code> is set to <var>yes</var>, the new dialog window will have a minimize system command icon in the titlebar and it will be minimizable. Any non-dialog window is always minimizable and <code>minimizable=no</code> will be ignored.</dd>
<dd>Obsługiwane przez: <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>fullscreen </dt>
<dd>Do not use. Not implemented in Mozilla. There are no plans to implement this feature in Mozilla.</dd>
<dd>This feature no longer works in MSIE 6 SP2 the way it worked in MSIE 5.x. The Windows taskbar, as well as the titlebar and the status bar of the window are not visible, nor accessible when fullscreen is enabled in MSIE 5.x.</dd>
<dd><code>fullscreen</code> always upsets users with large monitor screen or with dual monitor screen. Forcing <code>fullscreen</code> onto other users is also extremely unpopular and is considered an outright rude attempt to impose web author's viewing preferences onto users.</dd>
<dd><a href="#Note_on_fullscreen">Note on fullscreen</a></dd>
<dd>Obsługiwane przez: <img alt="Internet Explorer 5+" class="internal" src="/@api/deki/files/2324/=MSIE_ico.png"></dd>
<dd><code>fullscreen</code> does not really work work in MSIE 6 SP2.</dd>
</dl>
<h4 id="Features_requiring_privileges" name="Features_requiring_privileges">Features requiring privileges</h4>
<p>The following features require the <code>UniversalBrowserWrite</code> privilege, otherwise they will be ignored. Chrome scripts have this privilege automatically, others have to request it from the <a href="/pl/PrivilegeManager" title="pl/PrivilegeManager">PrivilegeManager</a>.</p>
<dl>
<dt>titlebar </dt>
<dd>By default, all new secondary windows have a titlebar. If set to <var>no</var>, this feature removes the titlebar from the new secondary window.</dd>
<dd>Mozilla and Firefox users can force new windows to always render the titlebar by setting<br>
<code>dom.disable_window_open_feature.titlebar</code><br>
to <var>true</var> in <code>about:config</code> or in their <a class="external" href="http://www.mozilla.org/support/firefox/edit#user">user.js file</a>.</dd>
<dd>Obsługiwane przez: <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>alwaysRaised </dt>
<dd>If set to <var>yes</var>, the new window will always be displayed on top of other browser windows, regardless of whether it is active or not.</dd>
<dd>Obsługiwane przez: <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>alwaysLowered </dt>
<dd>If set to <var>yes</var>, the new created window floats below, under its own parent when the parent window is not minimized. alwaysLowered windows are often referred as pop-under windows. The alwaysLowered window can not be on top of the parent but the parent window can be minimized. In NS 6.x, the alwaysLowered window has no minimize system command icon and no restore/maximize system command.</dd>
<dd>Obsługiwane przez: <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<dl>
<dt>z-lock </dt>
<dd>Same as <code>alwaysLowered</code>.</dd>
</dl>
<dl>
<dt>close </dt>
<dd>When set to <var>no</var>, this feature removes the system close command icon and system close menu item. It will only work for dialog windows (<code>dialog</code> feature set). <code>close=no</code> will override <code>minimizable=yes</code>.</dd>
<dd>Mozilla and Firefox users can force new windows to always have a close button by setting<br>
<code>dom.disable_window_open_feature.close</code><br>
to <var>true</var> in <code>about:config</code> or in their <a class="external" href="http://www.mozilla.org/support/firefox/edit#user">user.js file</a>.</dd>
<dd>Obsługiwane przez: <img alt="Netscape 6.x" class="internal" src="/@api/deki/files/2465/=Ns6.gif">, <img alt="Netscape 7.x" class="internal" src="/@api/deki/files/2334/=NS7_ico4.gif">, <img alt="Mozilla 1.x" class="internal" src="/@api/deki/files/2333/=Mozilla1_ico.png">, <img alt="Firefox 1.x" class="internal" src="/@api/deki/files/2305/=FF1x.png"></dd>
</dl>
<p>The position and size feature elements require a number to be set. The toolbars and window functionalities can be set with a <var>yes</var> or <var>no</var>; you can use <var>1</var> instead of <var>yes</var> and <var>0</var> instead of <var>no</var>. The toolbar and functionality feature elements also accept the shorthand form: you can turn a feature on by simply listing the feature name in the <var>strWindowFeatures</var> string. If you supply the <var>strWindowFeatures</var> parameter, then the <code>titlebar</code> and <code>close</code> are still <var>yes</var> by default, but the other features which have a <var>yes</var>/<var>no</var> choice will be <var>no</var> by default and will be turned off.</p>
<p>Example:</p>
<pre><script type="text/javascript">
var WindowObjectReference; // global variable
function openRequestedPopup()
{
WindowObjectReference = window.open("http://www.domainname.ext/path/ImgFile.png",
"DescriptiveWindowName",
"width=420,height=230,resizable,scrollbars=yes,status=1");
}
</script>
</pre>
<p>In this example, the window will be resizable, it will render scrollbar(s) if needed, if the content overflows requested window dimensions and it will render the status bar. It will not render the menubar nor the location bar. Since the author knew about the size of the image (400 pixels wide and 200 pixels high), he added the margins applied to the root element in MSIE 6 which is 15 pixels for top margin, 15 pixels for the bottom margin, 10 pixels for the left margin and 10 pixels for the right margin.</p>
<h3 id="Best_practices" name="Best_practices">Best practices</h3>
<pre><script type="text/javascript">
var WindowObjectReference = null; // global variable
function openFFPromotionPopup()
{
if(WindowObjectReference == null || WindowObjectReference.closed)
/* if the pointer to the window object in memory does not exist
or if such pointer exists but the window was closed */
{
WindowObjectReference = window.open("http://www.spreadfirefox.com/",
"PromoteFirefoxWindowName", "resizable=yes,scrollbars=yes,status=yes");
/* then create it. The new window will be created and
will be brought on top of any other window. */
}
else
{
WindowObjectReference.focus();
/* else the window reference must exist and the window
is not closed; therefore, we can bring it back on top of any other
window with the focus() method. There would be no need to re-create
the window or to reload the referenced resource. */
};
}
</script>
(...)
<p><a href="http://www.spreadfirefox.com/" target="PromoteFirefoxWindowName"
onclick="openFFPromotionPopup(); return false;"
title="This link will create a new window or will re-use
an already opened one">Promote Firefox adoption</a></p>
</pre>
<p>The above code solves a few usability problems related to links opening secondary window. The purpose of the <code>return false</code> in the code is to cancel default action of the link: if the onclick event handler is executed, then there is no need to execute the default action of the link. But if javascript support is disabled or non-existent on the user's browser, then the onclick event handler is ignored and the browser loads the referenced resource in the target frame or window that has the name "PromoteFirefoxWindowName". If no frame nor window has the name "PromoteFirefoxWindowName", then the browser will create a new window and will name it "PromoteFirefoxWindowName".</p>
<p>More reading on the use of the target attribute:</p>
<p><a class="external" href="http://www.w3.org/TR/html401/present/frames.html#h-16.3.2">HTML 4.01 Target attribute specifications</a></p>
<p><a class="external" href="http://www.htmlhelp.com/faq/html/links.html#new-window">How do I create a link that opens a new window?</a></p>
<p>You can also parameterize the function to make it versatile, functional in more situations, therefore re-usable in scripts and webpages:</p>
<pre><script type="text/javascript">
var WindowObjectReference = null; // global variable
function openRequestedPopup(strUrl, strWindowName)
{
if(WindowObjectReference == null || WindowObjectReference.closed)
{
WindowObjectReference = window.open(strUrl, strWindowName,
"resizable=yes,scrollbars=yes,status=yes");
}
else
{
WindowObjectReference.focus();
};
}
</script">
(...)
<p><a href="http://www.spreadfirefox.com/" target="PromoteFirefoxWindow"
onclick="openRequestedPopup(this.href, this.target); return false;"
title="This link will create a new window or will re-use
an already opened one">Promote
Firefox adoption</a></p>
</pre>
<p>You can also make such function able to open only 1 secondary window and to reuse such single secondary window for other links in this manner:</p>
<pre><script type="text/javascript">
var WindowObjectReference = null; // global variable
var PreviousUrl; /* global variable which will store the
url currently in the secondary window */
function openRequestedSinglePopup(strUrl)
{
if(WindowObjectReference == null || WindowObjectReference.closed)
{
WindowObjectReference = window.open(strUrl, "SingleSecondaryWindowName",
"resizable=yes,scrollbars=yes,status=yes");
}
else if(previousUrl != strUrl)
{
WindowObjectReference = window.open(strUrl, "SingleSecondaryWindowName",
"resizable=yes,scrollbars=yes,status=yes");
/* if the resource to load is different,
then we load it in the already opened secondary window and then
we bring such window back on top/in front of its parent window. */
WindowObjectReference.focus();
}
else
{
WindowObjectReference.focus();
};
PreviousUrl = strUrl;
/* explanation: we store the current url in order to compare url
in the event of another call of this function. */
}
</script>
(...)
<p><a href="http://www.spreadfirefox.com/" target="SingleSecondaryWindowName"
onclick="openRequestedSinglePopup(this.href); return false;"
title="This link will create a new window or will re-use
an already opened one">Promote Firefox
adoption</a></p>
<p><a href="http://www.mozilla.org/support/firefox/faq"
target="SingleSecondaryWindowName"
onclick="openRequestedSinglePopup(this.href); return false;"
title="This link will create a new window or will re-use
an already opened one">Firefox FAQ</a></p>
</pre>
<h3 id="FAQ" name="FAQ">FAQ</h3>
<dl>
<dt>How can I prevent the confirmation message asking the user whether he wants to close the window?</dt>
<dd>You can not. <strong>New windows not opened by javascript can not as a rule be closed by JavaScript.</strong> The JavaScript Console in Mozilla-based browsers will report the warning message: <code>"Scripts may not close windows that were not opened by script."</code> Otherwise the history of URLs visited during the browser session would be lost.</dd>
<dd><a href="/pl/Window.close" title="pl/Window.close">More on the window.close()</a> method</dd>
</dl>
<dl>
<dt>How can I bring back the window if it is minimized or behind another window?</dt>
<dd>First check for the existence of the window object reference of such window and if it exists and if it has not been closed, then use the <a href="/pl/DOM/window.focus" title="pl/DOM/window.focus">focus()</a> method. There is no other reliable way. You can examine an <a href="#Best_practices">example explaining how to use the focus() method</a>.</dd>
</dl>
<dl>
<dt>How do I force a maximized window?</dt>
<dd>You cannot. All browser manufacturers try to make the opening of new secondary windows noticed by users and noticeable by users to avoid confusion, to avoid disorienting users.</dd>
</dl>
<dl>
<dt>How do I turn off window resizability or remove toolbars?</dt>
<dd>You cannot force this. Users with Mozilla-based browsers have absolute control over window functionalities like resizability, scrollability and toolbars presence via user preferences in <code>about:config</code>. Since your users are the ones who are supposed to use such windows (and not you, being the web author), the best is to avoid interfering with their habits and preferences. We recommend to always set the resizability and scrollbars presence (if needed) to yes to insure accessibility to content and usability of windows. This is in the best interests of both the web author and the users.</dd>
</dl>
<dl>
<dt>How do I resize a window to fit its content?</dt>
<dd>You can not reliably because the users can prevent the window from being resized by unchecking the</dd>
</dl>
<p><code style="white-space: normal;">Edit/Preferences/Advanced/Scripts & Plug-ins/Allow Scripts to/ Move or resize existing windows</code><br>
checkbox in Mozilla or<br>
<code style="white-space: normal;">Tools/Options.../Content tab/Enable Javascript/Advanced button/Move or resize existing windows</code><br>
checkbox in Firefox or by setting<br>
<code>dom.disable_window_move_resize</code><br>
to <var>true</var> in the <code>about:config</code> or by editing accordingly their <a class="external" href="http://www.mozilla.org/support/firefox/edit#user">user.js file</a>.</p>
<dl>
<dd>In general, users usually disable moving and resizing of existing windows because allowing authors' scripts to do so has been abused overwhelmingly in the past and the rare scripts that do not abuse such feature are often wrong, inaccurate when resizing the window. 99% of all those scripts disable window resizability and disable scrollbars when in fact they should enable both of these features to allow a cautious and sane fallback mechanism if their calculations are wrong.</dd>
</dl>
<dl>
<dd>The window method <a href="/pl/DOM/window.sizeToContent" title="pl/DOM/window.sizeToContent">sizeToContent()</a> is also disabled if the user unchecks the preference <code>Move or resize existing windows</code> checkbox. Moving and resizing a window remotely on the user's screen via script will very often annoy the users, will disorient the user, and will be wrong at best. The web author expects to have full control of (and can decide about) every position and size aspects of the users' browser window ... which is simply not true.</dd>
</dl>
<dl>
<dt>How do I open a referenced resource of a link in a new tab? or in a specific tab?</dt>
<dd>Currently, you can not. Only the user can set his advanced preferences to do that. <a class="external" href="http://kmeleon.sourceforge.net/">K-meleon 1.1</a>, a Mozilla-based browser, gives complete control and power to the user regarding how links are opened. Some advanced extensions also give Mozilla and Firefox a lot of power over how referenced resources are loaded.</dd>
</dl>
<dl>
<dd>In a few years, the <a class="external" href="http://www.w3.org/TR/2004/WD-css3-hyperlinks-20040224/#target0">target property of the CSS3 hyperlink module</a> may be implemented (if CSS3 Hyperlink module as it is right now is approved). And even if and when this happens, you can expect developers of browsers with tab-browsing to give the user entire veto power and full control over how links can open web pages. How to open a link should always be entirely under the control of the user.</dd>
</dl>
<dl>
<dt>How do I know whether a window I opened is still open?</dt>
<dd>You can test for the existence of the window object reference which is the returned value in case of success of the window.open() call and then verify that <var>WindowObjectReference</var>.closed return value is <var>false</var>.</dd>
</dl>
<dl>
<dt>How can I tell when my window was blocked by a popup blocker?</dt>
<dd>With the built-in popup blockers of Mozilla/Firefox and Internet Explorer 6 SP2, you have to check the return value of <code>window.open()</code>: it will be <var>null</var> if the window wasn't allowed to open. However, for most other popup blockers, there is no reliable way.</dd>
</dl>
<dl>
<dt>What is the JavaScript relationship between the main window and the secondary window?</dt>
<dd>The return value of the window.open() method and the <a href="/pl/DOM/window.opener" title="pl/DOM/window.opener">opener</a> property. The <var>WindowObjectReference</var> links the main (opener) window to the secondary (sub-window) window while the opener keyword will link the secondary window to its main (opener) window.</dd>
</dl>
<dl>
<dt>I can not access the properties of the new secondary window. I always get an error in the javascript console saying "Error<span class="nowiki">:</span> uncaught exception<span class="nowiki">:</span> Permission denied to get property <property_name or method_name>. Why is that?</dt>
<dd>It is because of the cross-domain script security restriction (also referred as the "Same Origin Policy"). A script loaded in a window (or frame) from a distinct origin (domain name) <strong>cannot get nor set</strong> properties of another window (or frame) or the properties of any of its HTML objects coming from another distinct origin (domain name). Therefore, before executing a script targeting a secondary window, the browser in the main window will verify that the secondary window has the same domain name.</dd>
<dd>More reading on the cross-domain script security restriction: <a class="external" href="http://www.mozilla.org/projects/security/components/same-origin.html" rel="freelink">http://www.mozilla.org/projects/secu...me-origin.html</a></dd>
</dl>
<h3 id="Usability_issues" name="Usability_issues">Usability issues</h3>
<h4 id="Avoid_resorting_to_window.open.28.29" name="Avoid_resorting_to_window.open.28.29">Avoid resorting to <code>window.open()</code></h4>
<p>Generally speaking, it is preferable to avoid resorting to window.open() for several reasons:</p>
<ul>
<li>All Mozilla-based browsers offer tab-browsing and this is the preferred mode of opening referenced resources... not just in Mozilla-based browsers but in all other browsers offering tab-browsing. In other words, tab-capable browser users overall prefer opening new tabs than opening new windows in a majority of webpage situations. Tab-capable browsers have rapidly gained support and enthusiasm on internet in the last 2 years and this trend will likely continue. It has been confirmed that the new upcoming release of MSIE 7 in February 2006 will have full support for tab browsing.</li>
</ul>
<ul>
<li>There are now <a class="link-https" href="https://addons.update.mozilla.org/extensions/showlist.php?application=mozilla&category=Tabbed+Browsing&numpg=50&os=windows&version=auto-detect&submit=Update">several Mozilla extensions</a> (like Multizilla) and <a class="link-https" href="https://addons.update.mozilla.org/extensions/showlist.php?application=firefox&version=1.0+&os=Windows&category=Tabbed%20Browsing">Firefox extensions</a> (like <a class="link-https" href="https://addons.update.mozilla.org/extensions/moreinfo.php?application=firefox&version=1.0%20&os=Windows&category=Tabbed%20Browsing&numpg=10&id=158">Tabbrowser preferences</a>), features, settings and advanced preferences based on tab-browsing and based on converting window.open() calls into opening tabs, based on neutralizing window.open() calls, in particular in neutralizing unrequested openings of new windows (often referred as blocking unrequested popups or as blocking script-initiated windows opening automatically). Such features found in extensions include opening a link in a new window or not, in the same window, in a new tab or not, in "background" or not. Coding carelessly to open new windows can no longer be assured of success, can not succeed by force and, if it does, it will annoy a majority of users.</li>
</ul>
<ul>
<li>New windows can have menubar missing, scrollbars missing, status bar missing, window resizability disabled, etc.; new tabs can not be missing those functionalities or toolbars (or at least, the toolbars which are present by default). Therefore, tab-browsing is preferred by a lot of users because the normal user-interface of the browser window they prefer is kept intact, remains stable.</li>
</ul>
<ul>
<li>Opening new windows, even with reduced features, uses considerably a lot of the user's system resources (cpu, RAM) and involves considerably a lot of coding in the source code (security management, memory management, various code branchings sometimes quite complex, window frame/chrome/toolbars building, window positioning and sizing, etc.). Opening new tabs is less demanding on the user's system resources (and faster to achieve) than opening new windows.</li>
</ul>
<h4 id="Offer_to_open_a_link_in_a_new_window.2C_using_these_guidelines" name="Offer_to_open_a_link_in_a_new_window.2C_using_these_guidelines">Offer to open a link in a new window, using these guidelines</h4>
<p>If you want to offer to open a link in a new window, then follow tested and recommendable usability and accessibility guidelines:</p>
<h5 id="Never_use_this_form_of_code_for_links:.3Ca_href.3D.22javascript:window.open.28....29.22_....3E" name="Never_use_this_form_of_code_for_links:.3Ca_href.3D.22javascript:window.open.28....29.22_....3E"><em>Never</em> use this form of code for links:<br>
<code><a href="javascript:window.open(...)" ...></code></h5>
<p>"javascript:" links break accessibility and usability of webpages in every browser.</p>
<ul>
<li>"javascript:" pseudo-links become dysfunctional when javascript support is disabled or inexistent. Several corporations allow their employees to surf on the web but under strict security policies: no javascript enabled, no java, no activeX, no Flash. For various reasons (security, public access, text browsers, etc..), about 8% to 12% of users on the web surf with javascript disabled.</li>
<li>"javascript:" links will interfere with advanced features in tab-capable browsers: eg. middle-click on links, Ctrl+click on links, tab-browsing features in extensions, etc.</li>
<li>"javascript:" links will interfere with the process of indexing webpages by search engines.</li>
<li>"javascript:" links interfere with assistive technologies and several web-aware applications (e.g. PDA (Personal Digital Assistant).</li>
<li>"javascript:" links also interfere with "mouse gestures" features implemented in browsers.</li>
<li>Protocol scheme "javascript:" will be reported as an error by link validators and link checkers.</li>
</ul>
<p><strong>Further reading:</strong></p>
<ul>
<li><a class="external" href="http://www.useit.com/alertbox/20021223.html">Top Ten Web-Design Mistakes of 2002</a>, 6. JavaScript in Links, Jakob Nielsen, December 2002</li>
<li><a class="external" href="http://www.evolt.org/article/Links_and_JavaScript_Living_Together_in_Harmony/17/20938/">Links & JavaScript Living Together in Harmony</a>, Jeff Howden, February 2002</li>
<li><a class="external" href="http://jibbering.com/faq/#FAQ4_24">comp.lang.javascript newsgroup discussion FAQ on "javascript:" links</a></li>
</ul>
<h5 id="Nigdy_nie_u.C5.BCywaj_.3Ca_href.3D.22.23.22_onclick.3D.22window.open.28....29.3B.22.3E" name="Nigdy_nie_u.C5.BCywaj_.3Ca_href.3D.22.23.22_onclick.3D.22window.open.28....29.3B.22.3E">Nigdy nie używaj <code><a href="#" onclick="window.open(...);"></code></h5>
<p>Takie pseudo-linki ograniczają dostępność stron. <strong>Zawsze używaj rzeczywistych URLi jako wartości atrybutu href</strong> tak by w przypadku braku obsługi javascriptu lub gdy przeglądarka nie obsługuje otwierania odrębnych okien (jak w przypadku MS-Web TV, przeglądarek tekstowych, itp.), przeglądarka miała możliwość dostępu do zasobu zgodnie z domyślnym sposobem obsługi zasobów. Tak sformułowane linki kolidują także z dodatkowymi funkcjami przeglądarek obsługujących zakładki, np.: kliknięcie linku środkowym klawiszem myszy, kliknięcie linku z przytrzymanym klawiszem ctrl, naciśnięcie kombinacji ctrl+enter czy gesty myszą.</p>
<h5 id="Always_identify_links_which_will_create_.28or_will_re-use.29_a_new.2C_secondary_window" name="Always_identify_links_which_will_create_.28or_will_re-use.29_a_new.2C_secondary_window">Always identify links which will create (or will re-use) a new, secondary window</h5>
<p>Identify links that will open new windows in a way that helps navigation for users by coding the title attribute of the link, by adding an icon at the end of the link or by coding the cursor accordingly.</p>
<p>The purpose is to warn users in advance of context changes to minimize confusion on the user's part: changing the current window or popping up new windows can be very disorienting to users (Back toolbar button is disabled).</p>
<blockquote>
<p>"Users often don't notice that a new window has opened, especially if they are using a small monitor where the windows are maximized to fill up the screen. So a user who tries to return to the origin will be confused by a grayed out <em>Back</em> button."<br>
quote from <a class="external" href="http://www.useit.com/alertbox/990530.html">The Top Ten <em>New</em> Mistakes of Web Design</a>: 2. Opening New Browser Windows, Jakob Nielsen, May 1999</p>
</blockquote>
<p>When extreme changes in context are explicitly identified before they occur, then the users can determine if they wish to proceed or so they can be prepared for the change: not only they will not be confused or feel disoriented, but more experienced users can better decide how to open such links (in a new window or not, in the same window, in a new tab or not, in "background" or not).</p>
<p><strong>References</strong></p>
<ul>
<li>"If your link spawns a new window, or causes another windows to 'pop up' on your display, or move the focus of the system to a new FRAME or Window, then the nice thing to do is to tell the user that something like that will happen." <a class="external" href="http://www.w3.org/WAI/wcag-curric/sam77-0.htm">World Wide Web Consortium Accessibility Initiative regarding popups</a></li>
<li>"Use link titles to provide users with a preview of where each link will take them, before they have clicked on it." <a class="external" href="http://www.useit.com/alertbox/991003.html">Ten Good Deeds in Web Design</a>, Jakob Nielsen, October 1999</li>
<li><a class="external" href="http://www.useit.com/alertbox/980111.html">Using Link Titles to Help Users Predict Where They Are Going</a>, Jakob Nielsen, January 1998</li>
</ul>
<table class="standard-table">
<tbody>
<tr>
<td class="header" colspan="4">Przykład ikon & kursorów "Nowego okna"</td>
</tr>
<tr>
<td style="width: 25%;"><img alt="New window icon from yahoo.com"></td>
<td style="width: 25%;"><img alt="New window icon from microsoft.com" class="internal" src="/@api/deki/files/2463/=NewwinMSIE.gif"></td>
<td style="width: 25%;"><img alt="New window icon from webaim.org" class="internal" src="/@api/deki/files/2339/=Popup_requested_new_window.gif"></td>
<td style="width: 25%;"><img alt="New window icon from sun.com" class="internal" src="/@api/deki/files/2476/=PopupImageSun.gif"></td>
</tr>
<tr>
<td><img alt="New window icon from bbc.co.uk" class="internal" src="/@api/deki/files/2469/=Opennews_rb.gif"></td>
<td><img alt="New window icon from Accessible Internet Solutions" class="internal" src="/@api/deki/files/2205/=AIS_NewWindowIcon.png"></td>
<td><img alt="New window icon from accessify.com" class="internal" src="/@api/deki/files/2474/=Pop-up-launcher.gif"></td>
<td><img alt="New window icon from webstyleguide.com" class="internal" src="/@api/deki/files/2347/=Webstyleguide_com_newwind.gif"></td>
</tr>
<tr>
<td><img alt="New window icon from an unknown source" class="internal" src="/@api/deki/files/2475/=Popicon_1.gif"></td>
<td><img alt="New window icon from an unknown source" class="internal" src="/@api/deki/files/2462/=New.gif"></td>
<td><img alt="New window icon from an unknown source" class="internal" src="/@api/deki/files/2348/=WillCreateOrRecycleNewWindow.gif"></td>
<td><img alt="New window icon from gtalbot.org" class="internal" src="/@api/deki/files/2336/=OpenRequestedPopup.png"></td>
</tr>
<tr>
<td colspan="2"><img alt="New window cursor from draig.de" class="internal" src="/@api/deki/files/2300/=Cursor_LinkNewWindowTargetBlank.png"></td>
<td colspan="2"><img alt="New window cursor from mithgol.ru" class="internal" src="/@api/deki/files/2301/=Cursor_newwindowSergeySokoloff.png"></td>
</tr>
</tbody>
</table>
<h5 id="Always_use_the_target_attribute" name="Always_use_the_target_attribute">Always use the target attribute</h5>
<p>If javascript support is disabled or non-existent, then the user agent will create a secondary window accordingly or will render the referenced resource according to its handling of the target attribute: e.g. some user agents which can not create new windows, like MS Web TV, will fetch the referenced resource and append it at the end of the current document. The goal and the idea is to try to provide - <strong>not impose</strong> - to the user a way to open the referenced resource, a mode of opening the link. Your code should not interfere with the features of the browser at the disposal of the user and your code should not interfere with the final decision resting with the user.</p>
<h5 id="Do_not_use_target.3D.22_blank.22" name="Do_not_use_target.3D.22_blank.22">Do not use <code>target="_blank"</code></h5>
<p>Always provide a meaningful name to your target attribute and try to reuse such target attribute in your page so that a click on another link may load the referenced resource in an already created and rendered window (therefore speeding up the process for the user) and therefore justifying the reason (and user system resources, time spent) for creating a secondary window in the first place. Using a single target attribute value and reusing it in links is much more user resources friendly as it only creates one single secondary window which is recycled. On the other hand, using "_blank" as the target attribute value will create several new and unnamed windows on the user's desktop which can not be recycled, reused. In any case, if your code is well done, it will not interfere with the user's final choice but will rather merely offer him more choices, more ways to open links and more power to the tool he's using (a browser).</p>
<h3 id="Glossary" name="Glossary">Glossary</h3>
<dl>
<dt>Opener window, parent window, main window, first window </dt>
<dd>Terms often used to describe or to identify the same window. It is the window from which a new window will be created. It is the window on which the user clicked a link which lead to the creation of another, new window.</dd>
</dl>
<dl>
<dt>Sub-window, child window, secondary window, second window </dt>
<dd>Terms often used to describe or to identify the same window. It is the new window which was created.</dd>
</dl>
<dl>
<dt>Unrequested popup windows</dt>
<dd>Script-initiated windows opening automatically without the user's consent.</dd>
</dl>
<h3 id="Specification" name="Specification">Specification</h3>
<p>DOM Level 0. window.open() is not part of any W3C (World Wide Web Consortium) specification or technical recommendation.</p>
<h3 id="Notes" name="Notes">Notes</h3>
<h4 id="Note_on_precedence" name="Note_on_precedence">Note on precedence</h4>
<p>In cases where <code>left</code> and <code>screenX</code> (and/or <code>top</code> and <code>screenY</code>) have conflicting values, then <code>left</code> and <code>top</code> have precedence over <code>screenX</code> and <code>screenY</code> respectively. If <code>left</code> and <code>screenX</code> (and/or <code>top</code> and <code>screenY</code>) are defined in the <var>strWindowFeatures</var> list, then <code>left</code> (and/or <code>top</code>) will be honored and rendered. In the following example the new window will be positioned at 100 pixels from the left side of the work area for applications of the user's operating system, not at 200 pixels.</p>
<pre><script type="text/javascript">
WindowObjectReference = window.open("http://news.bbc.co.uk/",
"BBCWorldNewsWindowName",
"left=100,screenX=200,resizable,scrollbars,status");
</script>
</pre>
<p>If left is set but top has no value and screenY has a value, then left and screenY will be the coordinate positioning values of the secondary window.</p>
<p>outerWidth has precedence over width and width has precedence over innerWidth. outerHeight has precedence over height and height has precedence over innerHeight. In the following example, Mozilla-browsers will create a new window with an outerWidth of 600 pixels wide and will ignore the request of a width of 500 pixels and will also ignore the request of an innerWidth of 400 pixels.</p>
<pre><script type="text/javascript">
WindowObjectReference = window.open("http://www.wwf.org/",
"WWildlifeOrgWindowName",
"outerWidth=600,width=500,innerWidth=400,resizable,scrollbars,status");
</script>
</pre>
<h4 id="Note_on_position_and_dimension_error_correction" name="Note_on_position_and_dimension_error_correction">Note on position and dimension error correction</h4>
<p>Requested position and requested dimension values in the <var>strWindowFeatures</var> list will not be honored and <strong>will be corrected</strong> if any of such requested value does not allow the entire browser window to be rendered within the work area for applications of the user's operating system. <strong>No part of the new window can be initially positioned offscreen. This is by default in all Mozilla-based browser releases.</strong></p>
<p><a class="external" href="http://msdn.microsoft.com/security/productinfo/xpsp2/default.aspx?pull=/library/en-us/dnwxp/html/xpsp2web.asp#xpsp_topic5">MSIE 6 SP2 has a similar error correction mechanism</a> but it is not activated by default in all security levels: a security setting can disable such error correction mechanism.</p>
<h4 id="Note_on_scrollbars" name="Note_on_scrollbars">Note on scrollbars</h4>
<p>When content overflows window viewport dimensions, then scrollbar(s) (or some scrolling mechanism) are necessary to ensure that content can be accessed by users. Content can overflow window dimensions for several reasons which are outside the control of web authors:</p>
<ul>
<li>user resizes the window</li>
<li>user increases the text size of fonts via View/Text Zoom (%) menuitem in Mozilla or View/Text Size/Increase or Decrease in Firefox</li>
<li>user sets a minimum font size for pages which is bigger than the font-size the web author requested. People over 40 years old or with particular viewing habit or reading preference often set a minimal font size in Mozilla-based browsers.</li>
<li>web author is not aware of default margin (and/or border and/or padding) values applying to root element or body node in various browsers and various browser versions</li>
<li>user uses an user stylesheet (<a class="external" href="http://www.mozilla.org/support/firefox/edit#content">userContent.css in Mozilla-based browsers</a>) for his viewing habits which increases document box dimensions (margin, padding, default font size)</li>
<li>user can customize individually the size (height or width) of most toolbars via operating system settings. E.g. window resizing borders, height of browser titlebar, menubar, scrollbars, font size are entirely customizable by the user in Windows XP operating system. These toolbars dimensions can also be set via browser themes and skins or by operating system themes</li>
<li>web author is unaware that the user default browser window has custom toolbar(s) for specific purpose(s); e.g.: prefs bar, web developer bar, accessibility toolbar, popup blocking and search toolbar, multi-feature toolbar, etc.</li>
<li>user uses assistive technologies or add-on features which modify the operating system's work area for applications: e.g. MS-Magnifier</li>
<li>user repositions and/or resizes directly or indirectly the operating system's work area for applications: e.g. user resizes the Windows taskbar, user positions the Windows taskbar on the left side (arabic language based) or right side (Hebrew language), user has a permanent MS-Office quick launch toolbar, etc.</li>
<li>some operating system (Mac OS X) forces presence of toolbars which can then fool the web author's anticipations, calculations of the effective dimensions of the browser window</li>
</ul>
<h4 id="Note_on_status_bar" name="Note_on_status_bar">Note on status bar</h4>
<p>You should assume that a large majority of users' browsers will have the status bar or that a large majority of users will want to force the status bar presence: best is to always set this feature to yes. Also, if you specifically request to remove the status bar, then Firefox users will not be able to view the Site Navigation toolbar if it is installed. In Mozilla and in Firefox, all windows with a status bar have a window resizing grippy at its right-most side. The status bar also provides info on http connection, hypertext resource location, download progress bar, encryption/secure connection info with SSL (Secure Socket Layer) connection (displaying a yellow padlock icon), internet/security zone icons, privacy policy/cookie icon, etc. <strong>Removing the status bar usually removes a lot of functionality, features and information considered useful (and sometimes vital) by the users.</strong></p>
<h4 id="Note_on_security_issues_of_the_status_bar_presence" name="Note_on_security_issues_of_the_status_bar_presence">Note on security issues of the status bar presence</h4>
<p>In MSIE 6 for XP SP2: For windows opened using window.open():</p>
<blockquote>
<p>"For windows opened using window.open():<br>
Expect the status bar to be present, and code for it. <strong>The status bar will be on by default</strong> and is 20-25 pixels in height. (...)"<br>
quote from <a class="external" href="http://msdn.microsoft.com/security/productinfo/xpsp2/default.aspx?pull=/library/en-us/dnwxp/html/xpsp2web.asp#xpsp_topic5">Fine-Tune Your Web Site for Windows XP Service Pack 2, Browser Window Restrictions in XP SP2</a></p>
</blockquote>
<blockquote>
<p>"(...) windows that are created using the window.open() method can be called by scripts and used to spoof a user interface or desktop or to hide malicious information or activity by sizing the window so that the status bar is not visible.<br>
Internet Explorer windows provide visible security information to the user to help them ascertain the source of the Web page and the security of the communication with that page. When these elements are not in view, the user might think they are on a more trusted page or interacting with a system process when they are actually interacting with a malicious host. (...)<br>
<strong>Script-initiated windows will be displayed fully, with the Internet Explorer title bar and status bar.</strong> (...)<br>
Script management of Internet Explorer status bar<br>
Detailed description<br>
<strong>Internet Explorer has been modified to not turn off the status bar for any windows. The status bar is always visible for all Internet Explorer windows.</strong> (...) Without this change, windows that are created using the window.open() method can be called by scripts and spoof a user interface or desktop or hide malicious information or activity by hiding important elements of the user interface from the user.<br>
The status bar is a security feature of Internet Explorer windows that provides Internet Explorer security zone information to the user. This zone cannot be spoofed (...)"<br>
quote from <a class="external" href="http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2brows.mspx#ECAA">Changes to Functionality in Microsoft Windows XP Service Pack 2, Internet Explorer Window Restrictions</a></p>
</blockquote>
<h4 id="Note_on_fullscreen" name="Note_on_fullscreen">Note on fullscreen</h4>
<p>In MSIE 6 for XP SP2:</p>
<ul>
<li>"window.open() with fullscreen=yes will now result in a maximized window, not a kiosk mode window."</li>
</ul>
<ul>
<li>"The definition of the fullscreen=yes specification is changed to mean 'show the window as maximized,' which will keep the title bar, address bar, and status bar visible."</li>
</ul>
<p><em>References:</em></p>
<ul>
<li><a class="external" href="http://msdn.microsoft.com/security/productinfo/xpsp2/default.aspx?pull=/library/en-us/dnwxp/html/xpsp2web.asp#xpsp_topic5">Fine-Tune Your Web Site for Windows XP Service Pack 2</a></li>
</ul>
<ul>
<li><a class="external" href="http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2brows.mspx#ECAA">Changes to Functionality in Microsoft Windows XP Service Pack 2, Script sizing of Internet Explorer windows</a></li>
</ul>
<h4 id="Note_on_outerHeight_versus_height" name="Note_on_outerHeight_versus_height">Note on outerHeight versus height</h4>
<p><img alt="innerHeight vs outerHeight illustration"></p>
<h2 id="Tutorials" name="Tutorials">Tutorials</h2>
<p><a class="external" href="http://www.infimum.dk/HTML/JSwindows.html">JavaScript windows (tutorial)</a> by Lasse Reichstein Nielsen</p>
<p><a class="external" href="http://www.accessify.com/tutorials/the-perfect-pop-up.asp">The perfect pop-up (tutorial)</a> by Ian Lloyd</p>
<p><a class="external" href="http://www.gtalbot.org/FirefoxSection/Popup/PopupAndFirefox.html">Popup windows and Firefox (interactive demos)</a> by Gérard Talbot</p>
<h2 id="References" name="References">References</h2>
<p><a class="external" href="http://www.cs.tut.fi/~jkorpela/www/links.html">Links Want To Be Links</a> by Jukka K. Korpela</p>
<p><a class="external" href="http://www.evolt.org/article/Links_and_JavaScript_Living_Together_in_Harmony/17/20938/">Links & JavaScript Living Together in Harmony</a> by Jeff Howden</p>
|