CUTCODEDOWN
Minimalist Semantic Markup

Welcome Guest
Please Login or Register

If you have registered but not recieved your activation e-mail in a reasonable amount of time, or have issues with using the registration form, please use our Contact Form for assistance. Include both your username and the e-mail you tried to register with.

Author Topic: show window open in the middle of the screen  (Read 74 times)

durangod

  • Sr. Member
  • ****
  • Posts: 364
  • Karma: +5/-0
  • Weebles Wobble - but they dont fall down!
show window open in the middle of the screen
« on: 12 Aug 2023, 10:51:24 pm »
Hi,

coot i really like using reverso rather than google, thanks  :)     i went with the popup window rather than the iframe though.   

But how do i get my box to move to the middle of the screen,  i originally had hardcoded top 100 and left 900 but that was not working so i changed my code


here is the new code but the window is still on the left.  is this another firefox issue? 

Code: [Select]
function popitURL(url,ht,wd)
{
    var popwin = '';
    var left = (screen.width/2)-(wd/2);
    var top = (screen.height/2)-(ht/2);
   
    ht = parseInt(ht);
    wd = parseInt(wd);
       
   popwin = window.open( url, 'popwinname','location=0,status=0,scrollbars=1,directories=0,resizable=0,height='+ht+',width='+wd+',top='+top+',left='+left); 

}//close function popitURL



Update:   so just to share with those that use chromium, this is a bug in chromium, it has to do with having a second monitor. 

https://bugs.chromium.org/p/chromium/issues/detail?id=137681

im searching to see if chrome and FF have the same bug..
« Last Edit: 12 Aug 2023, 11:10:49 pm by durangod »

 

SMF spam blocked by CleanTalk

Advertisement