Posted By

luman on 06/29/06


Tagged

window popup


Versions (?)

Who likes this?

11 people have marked this snippet as a favorite

mate
meth
panatlantica
damarev
trof
vali29
chinlin62
ckayra
kele5240
seanpowell
guo3823538


popup center


 / Published in: JavaScript
 

  1. function popup(url,name,windowWidth,windowHeight){
  2. myleft=(screen.width)?(screen.width-windowWidth)/2:100;
  3. mytop=(screen.height)?(screen.height-windowHeight)/2:100;
  4. properties = "width="+windowWidth+",height="+windowHeight+",scrollbars=yes, top="+mytop+",left="+myleft;
  5. window.open(url,name,properties)
  6. }

Report this snippet  

You need to login to post a comment.