Tam Ekran ve merkezi Popup pencere açmak

by Eren 4. February 2009 18:43

Javasript pencere açma söz dizimi;

window.open([URL], [Window Name], [Feature List], [Replace]);

Özellikler listesi:

ÖzellikVarsayılan Açıklama
width auto specifies width of the new window in pixels
height auto height of the window in pixels
top auto specifies window position
left auto specifies window position
directories no should the directories bar be shown? (Links bar)
location no specifies the presence of the location bar
resizable no specifies whether the window can be resized.
menubar no specifies the presence of the menu bar
toolbar no specifies the presence of the toolbar
scrollbars no specifies the presence of the scrollbars
status no specifies the presence of the statusbar

 

Tam ekran pop up pencere için javascript kodu :

<script type="text/javascript">
<!--
function popupfs(url)
{
 params =  'top=0, left=0'
 params += ', width='+screen.width+', height='+screen.height;
 params += ', fullscreen=yes';
 newwin=window.open(url,'windowname4', params);
 if (window.focus) {newwin.focus()}
 return false;
}// -->

</script>

<a href="javascript: void(0)"
  onclick="popupfs('popup.html')">
Fullscreen popup window</a>

 

Fullscreen popup window

Ekranın Tam ortasına pop-up açmak

<script type="text/javascript">
<!--
function popup(url)
{
var width  = 300;
var height = 200;
var left   = (screen.width  - width)/2;
var top    = (screen.height - height)/2;
var params = 'width='+width+', height='+height;
params += ', top='+top+', left='+left;
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
params += ', resizable=no';
params += ', scrollbars=no';
params += ', status=no';
params += ', toolbar=no';
newwin=window.open(url,'windowname5', params);
if (window.focus) {newwin.focus()}
return false;
}
// -->

</script>

<a href="javascript: void(0)"
  onclick="popup('popup.html')">
Centered popup window</a>

Centered popup window

Tags:

javascript

Comments

5/12/2009 10:15:42 PM #

Yakalanmayan pop-up kodu arıyordum deneyeceğim inşallah işe yarar. Teşekkürler.

oyun kutusu | Reply

5/17/2009 3:24:15 PM #

Bende bunu arıyodum yaa, inşaallah işe yarayacağını umuyorum, tşk

chat | Reply

5/18/2009 3:27:05 AM #

sp2 yakalıyor mu bunu

toki | Reply

5/19/2009 11:34:42 PM #

Yakalanmıyor sanırım

Teoman | Reply

6/26/2009 6:25:48 PM #

bende çalışıyor

emlak | Reply

7/16/2009 4:16:04 PM #

Arkadaşlar bana sayfa girişinde otomatik açılacak bir popup kodu lazım bende var bitane ama çok yavaş ne yaptımsa olmadı kodu ekliyorum birde siz ustalarım bakarsa çok memnun olurum teşekkürler
<BODY onload="window.setTimeout('winopen()',1000)"> <script> function winopen(){ win = window.open("deneme.html" ,"Name","toolbar=no,menubar=no,width=400,height=200" ) } </script>
1000 yazan kısmı değiştirdim gene olmuyor açılma süresinde bi değişiklik yok

muhammed | Reply

5/21/2010 1:52:33 AM #

Alper A.

Peki hocam, bu ikinci verdigin koda ekleme yapmak istesem; söyle ki; acilacak olan ''dosya.html'' sayfasinin tam ortasini,yada sag alt kösesini direk olarak ekrana getirmek icin ve adres cubugunu gizlemek icin neler eklememiz gerekir bu koda?

Tesekkürler...

Alper A. Germany | Reply

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Eren Çetin - 2010
Eren Çetin, Bilgisayar Mühendisi , Yazılım Geliştirme Uzmanı