andrew4582

Popup window scripts

Aug 11th, 2010
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Popup window
  2. window.open('http://www.quackit.com/common/link_builder.cfm','popUpWindow','height=500,width=400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes');
  3.  
  4. // Popup window function
  5. function basicPopup(url) {
  6.     popupWindow = window.open(url,'popUpWindow','height=500,width=500,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes');
  7. }
  8.  
  9. //positionedPopup(this.href,'myWindow','500','300','100','200','yes')
  10. var popupWindowpositioned = null;
  11. function positionedPopup(url,winName,w,h,t,l,scroll){
  12.     settings =
  13.     'height='+h+',width='+w+',top='+t+',left='+l+',scrollbars='+scroll+',resizable'
  14.     popupWindowpositioned = window.open(url,winName,settings)
  15. }
  16.  
  17. //centeredPopup(this.href,'myWindow','500','300','yes');
  18. var popupWindowcentered = null;
  19. function centeredPopup(url,winName,w,h,scroll){
  20.     LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
  21.     TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
  22.     settings =
  23.     'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
  24.     popupWindowcentered = window.open(url,winName,settings)
  25. }
Advertisement
Add Comment
Please, Sign In to add comment