We Recommend

Pro JavaScript Techniques Pro JavaScript Techniques
Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.


Posted By

damarev on 07/17/06


Tagged


Versions (?)


Who likes this?

9 people have marked this snippet as a favorite

luman
meth
jkochis
Hirmine
fael
vali29
SpinZ
chinlin62
hans


center popup


Published in: JavaScript 


  1. <script type=text/javascript>
  2. <!--
  3. var win=null;
  4. function NewWindow(mypage,myname,w,h,scroll){
  5. var winl = (screen.width-w)/2;
  6. var wint = (screen.height-h)/2;
  7. var settings ='height='+h+',';
  8. settings +='width='+w+',';
  9. settings +='top='+wint+',';
  10. settings +='left='+winl+',';
  11. settings +='scrollbars='+scroll+',';
  12. settings +='resizable=yes';
  13. win=window.open(mypage,myname,settings);
  14. if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
  15. }
  16. //-->
  17. </script>

Report this snippet 

You need to login to post a comment.